473,569 Members | 2,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Submit button not working on a method="get" form after DataBind

Hi,

I have found a odd one, my submit button is not submitting on a
method="get" form after using any form of DataBind?

Has anyone struck this problem before?

here is snipits of the code as an example

<form id="frmUserSear ch" method="get" runat="server">
<asp:DropDownLi st ID="listBrokers "
Runat="server"
DataSource="<%# dvBrokers%>"
DataTextField=" BrokerName"
DataValueField= "BrokerID" />
<input type="submit" name="search" value="search">
</form>
private void Page_Load(objec t sender, System.EventArg s e)
{
Brokers brokers = Methods.GetBrok ers(login);
dvBrokers = new DataView(broker s.Broker, "", "BrokerName ",
DataViewRowStat e.CurrentRows);
//listBrokers.Dat aBind();<- including this is the problem
listBrokers.Ite ms.Insert(0, new ListItem("", ""));
}

Nov 19 '05 #1
2 1972
You are circumventing .NET, so it is understandable once you understand how
..NET works.

When you add a server side button to a form, .NET writes out some JavaScript
to capture the form submit and send it to the proper event handler on your
form. If you switch to GET, you are potentially interfering with this
process. If you truly desire a GET, you will have to handle more of the
coding yourself.
---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** ************
Think Outside the Box!
*************** ************

"ma**********@h otmail.com" wrote:
Hi,

I have found a odd one, my submit button is not submitting on a
method="get" form after using any form of DataBind?

Has anyone struck this problem before?

here is snipits of the code as an example

<form id="frmUserSear ch" method="get" runat="server">
<asp:DropDownLi st ID="listBrokers "
Runat="server"
DataSource="<%# dvBrokers%>"
DataTextField=" BrokerName"
DataValueField= "BrokerID" />
<input type="submit" name="search" value="search">
</form>
private void Page_Load(objec t sender, System.EventArg s e)
{
Brokers brokers = Methods.GetBrok ers(login);
dvBrokers = new DataView(broker s.Broker, "", "BrokerName ",
DataViewRowStat e.CurrentRows);
//listBrokers.Dat aBind();<- including this is the problem
listBrokers.Ite ms.Insert(0, new ListItem("", ""));
}

Nov 19 '05 #2
Hmm, I've into it further, and DataBind seems to be a read herring. If
i limited the numbers of brokers to around 90 it worked! It appears it
is the length of the ViewState, so you are right in a way. Using GET,
it still tries to send the ViewState in the query string an the Browser
(IE) must refuse to submit when the Querystring is just too long.
Having
enableViewState ="False" in the page declaration solved this. So it is
possible if you want to be bothered working with out viewstate.

Cowboy (Gregory A. Beamer) - MVP wrote:
You are circumventing .NET, so it is understandable once you understand how .NET works.

When you add a server side button to a form, .NET writes out some JavaScript to capture the form submit and send it to the proper event handler on your form. If you switch to GET, you are potentially interfering with this process. If you truly desire a GET, you will have to handle more of the coding yourself.
---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** ************
Think Outside the Box!
*************** ************

"ma**********@h otmail.com" wrote:
Hi,

I have found a odd one, my submit button is not submitting on a
method="get" form after using any form of DataBind?

Has anyone struck this problem before?

here is snipits of the code as an example

<form id="frmUserSear ch" method="get" runat="server">
<asp:DropDownLi st ID="listBrokers "
Runat="server"
DataSource="<%# dvBrokers%>"
DataTextField=" BrokerName"
DataValueField= "BrokerID" />
<input type="submit" name="search" value="search">
</form>
private void Page_Load(objec t sender, System.EventArg s e)
{
Brokers brokers = Methods.GetBrok ers(login);
dvBrokers = new DataView(broker s.Broker, "", "BrokerName ",
DataViewRowStat e.CurrentRows);
//listBrokers.Dat aBind();<- including this is the problem
listBrokers.Ite ms.Insert(0, new ListItem("", ""));
}


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
12394
by: lsarg | last post by:
i've been trying forever to figure out a way to use a regular text link in place of a submit button at the bottom of this. can't get it. i'm just starting to learn php, so i'm stuck. any help at all would be amazing. <?php # Script 12.7 - login.php // This is the login page for the site. // Include the configuration file for error...
7
20902
by: Rui Pestana | last post by:
Hello all, I want to use the POST method to submit the form and then grab the parameters in the asp file with request.form("parm"). The problem is that I am using the _search target to open the asp page. When I use _blank target there is no problem, either I use GET or POST method. But when I use _search target, only GET method works.
1
5357
by: Pete Mahoney | last post by:
Ok I use a textarea to store data input by the user, and then upon them clicking the submit button I store this data to a database. The problem is once the user inputs too much data (about 3 paragraphs or 2020 characters) when they click on the submit button nothing happens. When I say nothing happens I mean just that, nothing at all happens...
12
5730
by: Me | last post by:
Hi, I would like learn from people with experience in C++, which of the following styles of way to construct "get/set" member functions would be the best in terms of usability, speed, et cetera. The following class with be used as an example: class MyClass { public: // member function would go here. private: int data_;
2
16340
by: Alex | last post by:
Hello, I use the following script inside a page. My page contains : 1 FORM, Some Hidden fields, and one line of JAVASCRIPT in order to instantly post the Form. The problem is that under FIREFOX, the JAVASCRIPT line don't seems to be correct, because FIREFOX does'nt post the Form... But my javascript line looks correct to me... Below is...
3
10134
by: Adam | last post by:
Hey guys, I've decided to stop banging my head against the wall and just ask you guys for the answer. I can't seem to find it. I have a form in which I have multiple submit buttons; only, I'm using button tags, not input tags to do it. It seems that IE6 is treating all the button elements as being successful on submit. This is, to say...
2
6520
by: Tom S | last post by:
I'm using ASP.NET with C# as my code behind and I figure out how to get the above process to work. I've found many examples online for using the 'method' member to "POST", but none for setting it to and using "GET". Any help would be greatly appreciated. Thanks! Tom S
9
2312
by: Alexandra | last post by:
Not sure why none of these permutations are working. I appreciate a second set of eyes! .... <form id="form1" name="form1" > .... <input name="Submit1" type="submit" tabindex="10" onClick="parent.mainFrame.location.href='SelectSystem.html';" value="Done" />
1
3393
by: Jim Carlock | last post by:
Let's not argue about semantics. Let's talk about semasiology. Do specifications exist for using mixed case, upper case, lower case for the contents of the method employed? My own preferences lean towards the all lower-case model, simply because it reads a little easier when deployed with other XHTML semaphorings. --
0
7701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.