0

I have passed QueryString in hyperlink like below.

<a href="Property_Detail_Search.aspx?P_ID="+<%Request.QueryString["Property_Id"]%>
       itemprop="url"><span itemprop="streetAddress">

   <asp:Label ID="lblPNo" runat="server" ></asp:Label>
</a>
Mayank Pathak
  • 3,621
  • 5
  • 39
  • 67

2 Answers2

0

Because you are using <% %> in properties of Server side controls.

It should be as

<a href="Property_Detail_Search.aspx?P_ID="+<%# Request.QueryString["Property_Id"] #%
       itemprop="url"><span itemprop="streetAddress">

<%# expressions can be used as properties in server-side controls.<%= expressions cannot be used in ServerSide control's properties.

Read more it on MSDN. Also you could read another answer i had given on this Post

Community
  • 1
  • 1
Mayank Pathak
  • 3,621
  • 5
  • 39
  • 67
0

You try to add property_Id value which comes from addressbar. write = character before Request.QueryString["Property_Id"]

<a href="Property_Detail_Search.aspx?P_ID="+<%=Request.QueryString["Property_Id"]%>
   itemprop="url"><span itemprop="streetAddress">
zkanoca
  • 9,664
  • 9
  • 50
  • 94