Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello all

i am getting problem using querystring when i getting it to label here is my code:

<asp:Label ID="Lblcategory" runat="server" Text='<%=Request.QueryString["ctgname"]%>'></asp:Label>


and it displayed as

SQL
Select Parent Business Category:
<%=Request.QueryString["ctgname"]%>


please help me on this
Posted
Updated 14-Feb-11 19:33pm
v2

Use this way

<asp:Label ID="Lblcategory" runat="server" ><%=Request.QueryString["ctgname"]%></asp:Label>
 
Share this answer
 
Hi,

Please change your code as follows.

Instaed of assigning requested value to Text property,try to mention with in the label as follows.

XML
<asp:label id="Lblcategory" runat="server" xmlns:asp="#unknown"><![CDATA[<%=Request.QueryString["ctgname"]]]%><asp:label>


I think this will help you.

Regards,
Kiran.
 
Share this answer
 
v3
Comments
balongi 15-Feb-11 1:26am    
What is cdata here
Kirankumar Ballapalli 15-Feb-11 1:36am    
sorry its rendered wrongly.
<asp:Label ID="Lblcategory" runat="server" ><%=Request.QueryString["ctgname"]%></asp:Label>
Kirankumar Ballapalli 15-Feb-11 1:36am    
Its the correct format.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900