Re: Form trouble
- From: bruce barker <nospam@xxxxxxxxxx>
- Date: Sun, 14 Jan 2007 20:40:49 -0800
change the method to a get if you wat the form vriables on the url, or look in the form collection rather than the querystring collection
-- bruce (sqlwork.com)
Roshawn wrote:
Hi,.
I have a web page that contains an html form and has a few controls in it. The html form and its controls are all server controls. However, I've set the enableViewState attribute of the html form and its controls to false as I can get this data from the querystring and set appropriate form values via code.
When I perform a postback, the form's action attribute gets set by ASP.NET. No biggie there as it was designed to do just that. However, when I make changes to the controls in the html form (i.e. set different search parameters) nothing changes. Here's an example: First I set these parameters on the form
Search.aspx?keyword=hat&price=10&size=2
I then press the button on the form and perform a postback. The form's action attribute looks just like the above. But when I change the parameters of my search like this:
Search.aspx?keyword=headband&price=5&size=1
and press the button, I get the same results as the original search. I've checked my code to see if I've made any errors but found none. Then I right-click the page and select View Source to have a look at what's there. To my dismay, the html form's action attribute is still set to this:
Search.aspx?keyword=hat&price=10&size=2
No matter how many times I make changes to the parameters of the search and post the page back, the form's action attribute is still the same value. I can't change it for the life of me.
What's the problem? It's been three days already and I'm running out of hair (been pulling it out). Any help would be greatly appreciated.
Thanks,
Roshawn
P.S. This page is a content page. Perhaps this could be the issue but I can't see it.
- Follow-Ups:
- Re: Form trouble
- From: Roshawn
- Re: Form trouble
- References:
- Form trouble
- From: Roshawn
- Form trouble
- Prev by Date: Re: Sqlconnection object in website
- Next by Date: Re: Form trouble
- Previous by thread: Re: Form trouble
- Next by thread: Re: Form trouble
- Index(es):
Relevant Pages
|