willem1111
01-12-2010, 10:24 AM
Hi,
Sorry, but i am confused about creating the zoom search engine in a masterpage in a ASP.NET website. Please can you help me?
I installed the zoomASPX.dll en placed it in the bin folder. Snippets of the masterpage are:
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Diagnostics" %>
<%@ Master Language="VB" %>
<%@ Register Assembly="ZoomASPX" Namespace="ZoomASPX" TagPrefix="cc2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
And the link in the masterpage:
<div>
<cc2:ASPXSearch
ID="ASPXSearch1" runat="server" />
</div>
And finally search.aspx
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Diagnostics" %>
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%
Dim psi As ProcessStartInfo = New ProcessStartInfo
psi.FileName = Server.MapPath("search.cgi")
psi.EnvironmentVariables("REQUEST_METHOD") = "GET"
psi.EnvironmentVariables("QUERY_STRING") = paramStr
psi.EnvironmentVariables("REMOTE_ADDR") = Request.ServerVariables("REMOTE_ADDR")
psi.RedirectStandardInput = False
psi.RedirectStandardOutput = True
psi.UseShellExecute = False
Dim proc As Process = Process.Start(psi)
proc.StandardOutput.ReadLine()
Dim zoom_results As String = proc.StandardOutput.ReadToEnd
' read from stdout
proc.WaitForExit()
' Print the output
Response.Write(zoom_results)
%>
</div>
</form>
</body>
</html>
The user guide and other files at this place did'nt help me.
Sorry forn the text, but i am dutch. I understand the english language good, but to write is difficult.
Please can you help me?
With regards, Willem
Sorry, but i am confused about creating the zoom search engine in a masterpage in a ASP.NET website. Please can you help me?
I installed the zoomASPX.dll en placed it in the bin folder. Snippets of the masterpage are:
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Diagnostics" %>
<%@ Master Language="VB" %>
<%@ Register Assembly="ZoomASPX" Namespace="ZoomASPX" TagPrefix="cc2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
And the link in the masterpage:
<div>
<cc2:ASPXSearch
ID="ASPXSearch1" runat="server" />
</div>
And finally search.aspx
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Diagnostics" %>
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%
Dim psi As ProcessStartInfo = New ProcessStartInfo
psi.FileName = Server.MapPath("search.cgi")
psi.EnvironmentVariables("REQUEST_METHOD") = "GET"
psi.EnvironmentVariables("QUERY_STRING") = paramStr
psi.EnvironmentVariables("REMOTE_ADDR") = Request.ServerVariables("REMOTE_ADDR")
psi.RedirectStandardInput = False
psi.RedirectStandardOutput = True
psi.UseShellExecute = False
Dim proc As Process = Process.Start(psi)
proc.StandardOutput.ReadLine()
Dim zoom_results As String = proc.StandardOutput.ReadToEnd
' read from stdout
proc.WaitForExit()
' Print the output
Response.Write(zoom_results)
%>
</div>
</form>
</body>
</html>
The user guide and other files at this place did'nt help me.
Sorry forn the text, but i am dutch. I understand the english language good, but to write is difficult.
Please can you help me?
With regards, Willem