ZmrAbdulla
Technical User
I have a page redirect from a linkbutton like below.
Then in the load event of the "ShowDeptDocs" page I have this code to get the strings
It is working fine if there is no "&" in the string. If there is any "&" in the string then it truncates from there.
Eg:
This will pass only
as strings.
Is there any idea not to truncate the string or any other way to redirect the page.
thanks
________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
Code:
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Comp As String = Me.ListBox1.SelectedValue.ToString
Dim Dept As String = Me.ListBox2.SelectedValue.ToString
Response.Redirect("ShowDeptDocs.aspx?Comp=" + Comp + "&Dept=" + Dept)
End Sub
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Comp As String = Request.QueryString("Comp").ToString()
Dim Dept As String = Request.QueryString("Dept").ToString()
Me.LabelDisplay.Text = "Detalis of > " & Comp & " > " & Dept
End Sub
It is working fine if there is no "&" in the string. If there is any "&" in the string then it truncates from there.
Eg:
Code:
Comp="XYZ & Co"
Dept="This & That dept"
This will pass only
Code:
Comp= "XYZ"
Dept= "This"
Is there any idea not to truncate the string or any other way to redirect the page.
thanks
________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.