Connecting Tech Pros Worldwide Forums | Help | Site Map

passing parameter through navigateUrl

Newbie
 
Join Date: Apr 2009
Posts: 24
#1: Jun 4 '09
i am having problem with passing parameter through navigateUrl property of a hyperlink.
in the page where i am using the hyperlink , i am getting the data thorugh commonutility. i want to pass this data to the next page through navigateUrl. plz help.

Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#2: Jun 8 '09

re: passing parameter through navigateUrl


append the ?name=value&name=value to the url and then parse them on your next page?
Newbie
 
Join Date: Apr 2009
Posts: 24
#3: Jun 9 '09

re: passing parameter through navigateUrl


i am getting the value in the code behind, in the .cs page. how can i use that variable in the aspx page?? the value is coming from the previous page.
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#4: Jun 10 '09

re: passing parameter through navigateUrl


Well the code page BUILDS the aspx page, so if you have the value in the code section, just change a value on your aspx page?
Newbie
 
Join Date: Apr 2009
Posts: 24
#5: Jun 11 '09

re: passing parameter through navigateUrl


let me explain. i have a page where a bulleted list exists , with the list items as hotel, car , flight , railways.
each list item is hyperlinked to the booking form.
the parameters to pass are name of the place and booking type.
passing the booking type is not a problem.
but the name of the place comes from the previous page.
i get it by the code
string placename = commonutility.getQueryStringValue("placename");
in the .cs page.
how can i pass this value in the current page?
plz tell me with necessary code.
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#6: Jun 11 '09

re: passing parameter through navigateUrl


Write it out to the links in your bulleted list?
What custom libraries are you using that you have a "commonutility" object?
Newbie
 
Join Date: Apr 2009
Posts: 24
#7: Jun 12 '09

re: passing parameter through navigateUrl


well, i solved it. i think i should post it here so that someone else can be helped.

i used the following code in the .cs page

bl1.items.add( new listitem( "hotel", "page.aspx?aa"+ bb));

bl1 is the id of the bulleted list.
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#8: Jun 12 '09

re: passing parameter through navigateUrl


Yup, just put it in the link. (See my first post)
Reply