Re: Form trouble

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Form's action is set when the form is first loaded.
It will never change... the method is always post and that's what matters.


--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------


"Roshawn" <radawson218@xxxxxxxxx> wrote in message
news:eO9SjnDOHHA.4244@xxxxxxxxxxxxxxxxxxxxxxx
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.


.



Relevant Pages

  • Re: Form trouble
    ... 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 ... I have a web page that contains an html form and has a few controls in it. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to ignore postback values?
    ... > I have an html form with several ... > DropDowns and text boxes on it. ... > don't want the controls to keep their postback values. ... > How can I force my controls to forget their previous state? ...
    (microsoft.public.dotnet.framework.aspnet)
  • How to ignore postback values?
    ... I have an html form with several ... DropDowns and text boxes on it. ... want the controls to keep their postback values. ... How can I force my controls to forget their previous state? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to ignore postback values?
    ... Viewstate is not the only source of data for controls. ... Eliyahu ... > I have an html form with several ... > want the controls to keep their postback values. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Form trouble
    ... 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. ... When I perform a postback, the form's action attribute gets set by ASP.NET. ...
    (microsoft.public.dotnet.framework.aspnet)