0

i have link button inside gridview. can some one help me to form proper URL for this

  <asp:TemplateField HeaderText="View" >
<ItemTemplate><asp:LinkButton runat="server" ID="lnkView" OnClientClick="OpenDialog('/SitePages/View%20Booking.aspx?','','');return false;" ><%#Eval("Booking Name") %></asp:LinkButton>

                                     </ItemTemplate>

                                   </asp:TemplateField>

if i use above, than popup opens fine on link button click but if append parameter as shown below, it throws error on load itself.

<asp:LinkButton runat="server" ID="lnkView" OnClientClick="OpenDialog('/SitePages/View%20Booking.aspx?BID="+ Eval("ID")+"','','');return false;" ><%#Eval("Booking Name") %></asp:LinkButton>

can some one help to form proper URL?

1 Answer 1

0

use escape entities like \"

or you don't need to use quotes for the query string values it will work without that also

1
  • can you form it ? Commented Nov 29, 2014 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.