hirdesh ronaldo

hirdesh ronaldo

  • NA
  • 4
  • 13.3k

Request.Querystring not returning correct data

Feb 6 2014 6:45 AM
Hi All,
Thanks in adv,
I have prob in using Gridview and link button.
Scenerio : I have gridview and I am using link button in gridview.
-- code for creating link button in grid view.

<Columns>
 
<asp:TemplateField HeaderText="Tool Name" ItemStyle-HorizontalAlign="Left"
FooterStyle-HorizontalAlign="Center">
<ItemTemplate>                                                  
                                                      
<asp:LinkButton ID="lnkToolProc" runat="server" CausesValidation="False" Text='<%#Eval("varToolName") %>'></asp:LinkButton>
                                                                                                                          
</ItemTemplate>
</asp:TemplateField>

</Columns>

 
I have js function which I called on this link button click, I pass toolname as ID from link button to popup window.
javascript function :
function CallToolprocurement(id)
{
window.showModalDialog("ViewToolProcurement.aspx?id=" + id, "null", "status:no;dialogWidth:450px;dialogHeight:300px;dialogHide:true;help:no;scroll:no");
return false;          
}
On the popup window I am writing below code to get Id from previous page
 
string Toolname = Request.QueryString["id"].ToString(); // I m taking toolname in Id from previous page
 

Problem : Its working fine but problem is some toolname contains special char in name ex : msdn 3.5&4.0  and "

Adobe® Digital Publishing Suite"  So while getting toolname from request.querystring I am not getting complete name. Its break after special char. ex :

Adobe® Shadow : not getting same name.
AT&T : getting only AT , missing T
 
 
Can you pls help me how to resolve it or any alternative to achieve same functionality.
 
 
Thanks a lot !!

 

 

 

 

Answers (3)