CSharp/C# >> problem of html form auto submit

by Y2hpbmFzcHJpdA » Mon, 08 Sep 2008 18:45:01 GMT

htmlelement btn=...;
btn.invokemember("click");

if <form> no name,no function and submit button no function,it's the only
way to submit? the "click" is useful. it comes where?

Similar Threads

1. Submit a HTML Form programmatically

Hi

I want to be able to retrieve the data from a given URL, fill in the
necessary form fields and submit the form back to the server, all from
within a Windows Application. I can retrieve the HTML from the page,
using the HttpWebRequest class but that is where I have become stuck.
These are the remaining items I would like to be able to do

1 Fill in the necessary fields on the form.
2 Submit the data back to the server
3 Retrieve the response from the server and start the loop again.

Any ideas?


Thanks

Darran

2. Embedded HTML Control Not Submitting Forms - Windows CE

3. Auto Form Submit

Hi guys,

I have the following

  <form name="formpurchase" id="formpurchase"
method=postaction="https://site.cgi">
   <input type=hidden name="MerchantNumber" value="<%=MerchantNumber
%>">
   <input type=hidden name="ReturnURL" value="<%=retURL %>">
   <input type=hidden name="Products" value="<%=Products %>">

   <input type=submit value="Continue" name="submit">
 </form>

How do I make it so that submission is done automatically? (without
pressing the button)

I've added this but it says 'object doesn't support this property'
<script language="javascript">
<!--
if(document.all){
frm=document.all.formpurchase
}
if(document.getElementById){
frm=document.getElementById("formpurchase")
}
if (frm) frm.submit();
-->
</script>


Thanks
MA

4. problems submitting a form for a file upload programmatically

5. Submitting an HTML form in ASP.NET

I'm using Visual Studio to create an ASP.NET application. I'm getting a 
strange result when submitting a traditional HTML form (ie not a Web form) to 
an ASPX page. My purpose is to be able to submit some form data to a 
different page other than the page that I originate from (ie not a post back).

What seems to occur is a delay in the form data being received by the new 
page. In other words, in the Page Load event of the receiving page...

The Page.Request.Form.Item collection starts out empty. The system steps 
through the page load code until it reaches a statement that errs out trying 
to access the form data. An error page flashes up for just a moment 
indicating the problem. But then after a second or so, the page_load event 
re-starts on its own and the Page.Request.Form.Item collection now has data 
and the page load goes on its merry way.

Is this a problem anybody else has had? Is there a fix to get the submitted 
form data to show up before the page load starts? I guess I should be happy 
that in the end the page works properly, but I would like to eliminate the 
error page that flashes up momentarily.

Thanks
Chuck

6. Auto web fill in and submit - CSharp/C#

7. Web Form HTML Auto Formatting

I am using VS NET 2003 Professional and am just starting 
to develop ASP.NET apps.  Every time I touch modifiy a 
page using the web form designer all the underlying HTML 
is being completely re-formatted by VS.NET.

I have tried all the config settings in Tools...Options  
and nothing seems to work.  I know there must be a simple 
setting somewhere to govern this annoying behaviour, but I 
cannot find it and it is driving me nuts!

Any help would be greatly appreciated.

Glenn.

8. Catching Submit Event even called by document.forms[0].submit() - Asp.Net