谢谢关于request得到的是乱码的问题
本人在a页面中有一段代码
function adc()
{
var stri
stri= 'adc.aspx '
window.open(stri, 'align ', 'width=300,height=280,toolbar=no,titlebar=no ')
}
弹出的页面地址是
http://192.168.1.3/sch.aspx?pname=王海峰
弹出的页面的代码如下,request得到的东西我用response.write写到页面上,是乱码!转换查看中的编码也不起作用
<%@ Page Language= "VB "%>
<%@Import Namespace= "System.Data "%>
<%@Import Namespace= "System.Data.Sqlclient "%>
<%@ Register
Assembly= "AjaxControlToolkit "
Namespace= "AjaxControlToolkit "
TagPrefix= "ajaxToolkit " %>
<script runat= "server " language= "vb ">
Sub Page_Load()
Dim str As String
Dim con As SqlConnection
Dim strcmd As String
Dim cmd As SqlCommand
Dim da As SqlDataReader
str = Request( "pname ")
Response.Write(str)
con = New SqlConnection(ConfigurationSettings.AppSettings( "innsa "))
strcmd = "select * from tr where pname= ' " & Request.QueryString( "pname ") & " ' "
cmd = New SqlCommand(strcmd, con)
con.Open()
da = cmd.ExecuteReader()
If da.Read() Then
dep.Text = da( "dep ")
pname.Text = da( "pname ")
sex.Text = da( "sex ")
mob.Text = da( "mob ")
tel.Text = da( "tel ")
addr.Text = da( "addr ")
eml.Text = da( "eml ")
End If