Click here to Skip to main content
15,908,675 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my first page
VB
Protected Sub b_addq_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles b_addq.Click

       url = "addoption.aspx?l_qid=" & tb_qid.Text & "l_ques =" & tb_ques.Text

       Response.Redirect(url)
   End Sub


second page
VB
l_qid.Text = Request.QueryString("l_qid")
       l_ques.Text = Request.QueryString("l_ques")


i got both value in l_qid
Posted
Comments
Ankur\m/ 6-Feb-13 1:37am    
So what is the question here?
supriya931 6-Feb-13 2:29am    
addoption.aspx?l_qid=1&l_ques=tttt it is the my url which show only qid

1 solution

You missed & (querystring separator).

Correct this line:
VB
url = "addoption.aspx?l_qid=" & tb_qid.Text & "l_ques =" & tb_ques.Text

to
VB
url = "addoption.aspx?l_qid=" & tb_qid.Text & "&l_ques =" & tb_ques.Text
 
Share this answer
 
Comments
supriya931 6-Feb-13 2:08am    
but now it will not show the text on second page
Sandeep Mewara 6-Feb-13 2:13am    
Why will it not?
Querystrings are implemented that way. Anything after a ? is part of querystring. & separates the key-value pairs.
Request.QueryString("l_qid") & Request.QueryString("l_ques") will give you the two values.

While in debug, make sure your url is of form:
url = "addoption.aspx?l_qid=somevalueA&l_ques=somevalueB"
supriya931 6-Feb-13 2:26am    
ya it is in same manner but it show only quesid not question
Sandeep Mewara 6-Feb-13 2:28am    
Paste here exact URL that gets formed.
supriya931 6-Feb-13 2:34am    
addoption.aspx?l_qid=1&l_ques=tttt it is it show only qid

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