Auto fill in and submit form in normal web page

Ming Cheung 421 Reputation points

i want to automatic form submittion in normal web page,
but no idea how to start, searched but no article about it.
could anyone help some instruction? thank you

A set of technologies in the .NET Framework for building web applications and XML web services.
1,327 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,603 questions
No comments
{count} votes

2 answers

Sort by: Oldest
  1. Lan Huang-MSFT 11,821 Reputation points Microsoft Vendor

    Hi @Ming Cheung ,
    I think you can use JavaScript to do this, using the javascript onload method. Just add the following JavaScript code on your form page.

    <html xmlns="">  
    <head runat="server">  
            <script type="text/javascript">  
      oad = function () {  
                document.getElementById('<%= commentTextBox.ClientID %>').value = 'whatever value';  
                var form = document.getElementById("form1");  
        <form id="form1" runat="server">  
               <asp:TextBox id="commentTextBox" runat="server"></asp:TextBox>  

    Best regards,
    Lan Huang

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  2. Ming Cheung 421 Reputation points

    Please cancel the question