Click here to Skip to main content
15,888,273 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have using regno as string now i pass to and get on that query string given....but the value not passed....
http://localhost:4624/administration/Services/ServiceMemberCallLogProcess.aspx?Regno=%3C%Eval%28%22Regno%22%29%20%%3E
.if i passed any regno the above url only came.what happen?

ASP
public string Regno
        {
            get
            {
                return CommonHelper.QueryString("Regno");

            }
        }
           }
Posted
Updated 22-Apr-13 2:41am
v4
Comments
Tejas Vaishnav 22-Apr-13 8:44am    
what is actual value of query string?
Ali Reza Barkhordari 22-Apr-13 8:45am    
where you generate the query string ? in javascript ?
venkivenkatesan 22-Apr-13 9:06am    
i showed lots of reg no in grid view and with edit button in all rego num ......if i click edit button the given url only passed...that regno not passed....tell me answer please

Hi venkivenkatesan,

Looks like your binding the value
C#
<%Eval("Regno" )%>
to the querystring value. AS the syntax is incorrect, the compliler is interpreting it as a static value instead of a dynamic value.

There is a missing # part in that scenario, which is causing the issue.

Try this one instead of yours:

C#
<%# Eval("Regno" )%>



Thank you,
Vamsi
 
Share this answer
 
v2
Comments
venkivenkatesan 22-Apr-13 9:23am    
thank you vamsi..thank you so much i did'nt note that
RelicV 22-Apr-13 12:13pm    
You're welcome. Please Upvote the answer if it solved your problem. Some one down voted me. :(
if you generate query string in client ( via javascript)
use:
JavaScript
function escape()

if you generate query string in server ( via .NET languages)
use:
C#
function eval()

never generate query string by yourself !!
 
Share this answer
 
v3

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

  Print Answers RSS


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