Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello there,
I want when I click on button create, the URL became like this :

http:/loclhost/create_profil/firstname=Nom&lastname=prenom

nom=textBox.Text
prenom=textBox.Text
Posted
Comments
Kornfeld Eliyahu Peter 16-Apr-15 14:09pm    
What is the issue?

you are missing (?) in your query string
if we assume you are using asp.net c# and want to redirect with parameters
C#
String my link="create_profil.aspx?firstname=" +nom +"&lastname=" +prenom ;
Response.Redirect(mylink);

hope this helps!
 
Share this answer
 
Comments
M-osab 22-Apr-15 10:12am    
thanks, its work
If we assume that you are using ASP.Net and textbox are enclosed in the form tag then set the method=get on the form tag then values are posted as query string as you expected.

HTML
<form method="get">
</form>
 
Share this answer
 

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