I have a droplist value that I want to pass as a filter in a select statement...using the afterupdate event. How do you do this in an aspx.vb code behind file? Thanks
Yes , I know how to do a parameterised Select. But the droplist is on one page and the records to be filtered are on another page , so do I need to pass the values to the request.query string of the receiving page?
Oh, sorry. Here's how you might do that:Dim filtValue As String = myDropDown.SelectedItem.Text Response.Redirect("displayPage.aspx?filter=" + filtValue) If the selected string could contain blanks or other special characters, you might wrap the whole
URL in a Server.URLEncode. You can retrieve the filter value on the target page using Request.Querystring("filter")
Hi Jim I have got the data filtered using your suggestion but now I need to get the page to load in a Iframe. I was using a hyperlink and that was working becuase you can specify the target. I have tried Response.RedirectLocation = "http://localhost/cwProjLocal/ProposalList.aspx"
but that brings up the page in its own window and not in the Iframe. Do you perhaps know how to send the response.redirect to a Iframe? Thanks
whitegrs
Member
20 Points
4 Posts
Request.QueryString ?
Jul 31, 2003 01:53 PM|LINK
JimRoss [MVP...
Star
10080 Points
2008 Posts
Re: Request.QueryString ?
Jul 31, 2003 01:57 PM|LINK
Dim filterValue As String filterText = myDropDown.SelectedItem.Text myCommand.Parameters.Add("@FilterValue", filterText)Note that I left out a bunch of the code for creating and running the command and only showed how to set the parameter value.MS MVP ASP.NET [VC++/MFC emeritus]
Old Dog Learns New Tricks
Preferred programming language: cuneiform on clay tablets
whitegrs
Member
20 Points
4 Posts
Re: Request.QueryString ?
Jul 31, 2003 02:03 PM|LINK
JimRoss [MVP...
Star
10080 Points
2008 Posts
Re: Request.QueryString ?
Jul 31, 2003 02:15 PM|LINK
Dim filtValue As String = myDropDown.SelectedItem.Text Response.Redirect("displayPage.aspx?filter=" + filtValue) If the selected string could contain blanks or other special characters, you might wrap the whole URL in a Server.URLEncode. You can retrieve the filter value on the target page using Request.Querystring("filter")MS MVP ASP.NET [VC++/MFC emeritus]
Old Dog Learns New Tricks
Preferred programming language: cuneiform on clay tablets
whitegrs
Member
20 Points
4 Posts
Re: Request.QueryString ?
Jul 31, 2003 02:45 PM|LINK
whitegrs
Member
20 Points
4 Posts
Re: Request.QueryString ?
Aug 01, 2003 12:56 PM|LINK