471,338 Members | 1,180 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

Vs 2005 - Asp.net Passing parameters

I am working with a page that filters my results by the parameters that I am passing in the query string. I have multiple parameters that can be applied or not depending on what the user wants to see. It is somewhat of a drill down filter.

I can set up my links to pass the specific parameters (Price, Type, Etc) from the links with their specific values. Here is what I am getting caught up on.

Example:

Expand|Select|Wrap|Line Numbers
  1. Page = http://localhost/Site/tabid/58/Default.aspx
With Price parameter passed =
Expand|Select|Wrap|Line Numbers
  1. http://localhost/Site/tabid/58/Default.aspx?Price=50
This will filter my results based on the price being 50. This is working great. Now if they want to drill down and choose Type = 2 as well, I can't figure out how to place only &Type=2 to the end of the string. I can only create the link to make the new url
Expand|Select|Wrap|Line Numbers
  1.  http://localhost/Site/tabid/58/Default.aspx?Type=2
I need for it to come out to
Expand|Select|Wrap|Line Numbers
  1. http://localhost/Site/tabid/58/Default.aspx?Price=50&Type=2
.

After I get this process figured out, I will have to create a remove filter link specific to either Price, Type, etc while leaving the other parameters in the url. That is an after I get this done project though.

Any help or ideas would be great.
May 8 '07 #1
1 1281
Alright I have working with the additional parameters for my drill down. I am using the following to create the new string each time.

Code behind
Expand|Select|Wrap|Line Numbers
  1. Public strURL As String
  2. strURL = Request.Url.ToString
  3.  
ASCX controller sample
Expand|Select|Wrap|Line Numbers
  1. <a href="<%=strURL %>&mxpr=1000000&mnpr=500000">$500K - $1M</a>
Now the next step for me is to create a remove link once the mxpr and mnpr parameters are passed.

I need to grab the URL string and pull out &mxpr=1000000&mnpr=500000. Any ideas before I spend another day to figure this one out.

Thanks in advance. Hope this might help someone down the road.
May 9 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by domeceo | last post: by
17 posts views Thread by Charles Sullivan | last post: by
6 posts views Thread by | last post: by
4 posts views Thread by dan688 | last post: by
2 posts views Thread by Nab | last post: by
2 posts views Thread by csmith8933 | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.