Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - ASP/ASP.NET/Web Services/Other
Forum to discuss building external web applications for SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ASP/ASP.NET/Web Services/Other | New ThreadView:  Search:  
 Author  Thread: Putting request.querystring in NavigateUrl= of asp:hyperlink
David Nunnally
Posts: 206
 
Putting request.querystring in NavigateUrl= of asp:hyperlinkYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Dec 06 10:14 AM
fiogf49gjkf0d
I need to add the request.querystring("event") value to the NavigateUrl of this link such as help.aspx?event=<.%.= request..querystring("event") %.>

[asp;hyperlink runat server NavigateUrl=help.aspx ]Help! [/asp;hyperlink]

(had to play with syntax to get it to display!)

What is the proper way to do this with VS .NET 2003?

Signed very green .NET newbie!
[Reply][Quote]
Jason Huber
Posts: 77
 
Re: Putting request.querystring in NavigateUrl= of asp:hyperlinkYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jan 07 1:03 PM
fiogf49gjkf0d
'Be sure to check that the param exists first

mylink.navigateURL = "help.aspx?event=" + request.params["event"]
(in codebehind or code block)

Since you asked the proper way...
I dont think it is appropriate to edit the navigateurl property using <%%> as you would have with classic ASP
This is why MS exposed such rich objects. If you have a need to edit it in the manner you have, then you should just use a hyperlink control from the html section (not )


[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Putting request.querystring in NavigateUrl= of asp:hyperlinkYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jan 07 2:24 PM
fiogf49gjkf0d
As Jason mentioned, you want to check for non-null existence of the param and it's probably better to do it in another place anyway. I'd probably check in the page_load for when !this.IsPostBack for the param and then set the NavigateUrl from the codebehind.

Something like this:

void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
object o = Request.QueryString["event"];
if (o != null) linkHelp.NavagateUrl = "help.aspx?event=" + o.ToString();
}
}


Got it?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Putting request.querystring in NavigateUrl= of asp:hyperlinkYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jan 07 2:26 PM
fiogf49gjkf0d
Another option is to use a LinkButton as well. Then, there is no URL for the link, but instead if raises a postback, which you could then get the event param and do a Response.Redirect("page.aspx?event=" + eventparam);
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: Putting request.querystring in NavigateUrl= of asp:hyperlinkYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 07 11:31 AM
fiogf49gjkf0d
Thanks guys. That was exactly what I needed to know.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 11:05:08 AM