473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Posting to ASP.Net form from ASP.Net Form

122 100+
I will post the question again and try to be more clear this time.

I currently use an HTML form (Login Form) to go to an ASP.NET page which is also a login Form. I need to change this because I am currently working inside an asp.net page and embedded forms won't do it.

The current HTML version is

Expand|Select|Wrap|Line Numbers
  1.  <form name="Form1" id="Form1" action="http://98.141.202.213/ccweb/login.aspx" method="post">
  2.                 <input type ="hidden" value="1" name="Flag"/>
  3.         <div class="login-field">
  4.  
  5.           <label>Account No.</label>
  6.           <input name="AccNo" id="AccNo" type="text" />
  7.           <br />
  8.           <label>User Id</label>
  9.           <input name="UserID" id="UserID" type="text" />
  10.           <label>Password</label>
  11.           <input id="Passwd" name="Passwd"" type="password" />
  12.         </div>
  13.         <div class="login-button">
  14.           <label>
  15.             <input type="submit" name="button" id="button" value="" />
  16.           </label>
  17.  
  18.         </div> </form>
I have ported this to asp.net

Expand|Select|Wrap|Line Numbers
  1. private string PostUrl = "http://98.175.26.137/ccweb/Login.aspx"; // you shouldn't need to change this
  2.  
  3. private void LoadSettings()
  4. {
  5. Title1.Visible = !this.RenderInWebPartMode;
  6. if (this.ModuleConfiguration != null)
  7. {
  8. this.Title = this.ModuleConfiguration.ModuleTitle;
  9. this.Description = this.ModuleConfiguration.FeatureName;
  10. }
  11.  
  12. btnLoginButton.PostBackUrl = PostUrl;
  13. }
  14.  
  15. <asp:Panel ID="Login" runat="server" CssClass="modulecontent">
  16. <p></p>
  17. Account No: <asp:TextBox ID="AccNo" runat="server" name="AccNo"></asp:TextBox>
  18. User ID: <asp:TextBox ID="UserID" runat="server" name="UserID"></asp:TextBox>
  19. Password: &nbsp <asp:TextBox id="Passwd" TextMode="password" runat="server" name="Passwd"/>
  20. <asp:Button ID="btnLoginButton" runat="server" Text="Submit" />
  21. </asp:Panel>
But.... I am unsure how to get this to behave like the HTML version so that it will pass the three text fields to the login.aspx form.

Any help would be great.
May 5 '12 #1
1 1808
DragonLord
122 100+
please delete duplicate thread
May 5 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Linda | last post by:
I've created a simple form for a conf registration, that successfully validates the form. But then in testing, when you try to submit, Outlook Express comes up automatically, instead of my own...
2
by: emu | last post by:
Hi I have a form which is contained in a <div> in the template which searches our Intranet, Staff directory or Google. This form needs to work client side so I am using JavaScript and HTML no...
3
by: fh1996 | last post by:
Form.Owner and Form.Parent, what's the difference between them? Form.ShowDialog() and Form.Show(), when to use which? Form.Activated(), what does it mean when saying a Form is "activated"? ...
2
by: Brendan Vogt | last post by:
I have an ASP file that loads the various provincess from my province table into a combo box. When the user selects a province, it then reads in all the associated regions for that province into...
2
by: Jeff Baker | last post by:
How does one post to an ASPX page using the WebClient when the form name is required?
7
by: Mark Waser | last post by:
Hi all, I'm trying to post multipart/form-data to a web page but seem to have run into a wall. I'm familiar with RFC 1867 and have done this before (with AOLServer and Tcl) but just can't seem...
2
by: Grey Alien | last post by:
I am trying to programatically POST an ASP form, to allow me to log on to a site programatically. <form name="aspnetForm" method="post" action="Default.aspx" id="aspnetForm"> <input...
9
by: phopman | last post by:
Hello! I am currently working on a project. And have been assigned to get up to speed quickly on php. And even though I love the language, it's not easy to get up to speed in like 2 seconds :-) ...
1
by: starter08 | last post by:
Hi, I have a C++ routine(client-side) which uploads an xml file to a web server by making a socket connection and sending all the post request through that socket. On the server side I have a cgi...
1
by: helplakshmi | last post by:
I want to download the records of the output of search criteria to excel. As the fields for search criteria are more than 20. I am submitting the form with POST method rather than GET. On click...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.