473,320 Members | 2,097 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,320 software developers and data experts.

pass the right form input to the right control

Tom
Hi,

I have this question below but still cannot fix it.

http://communities.microsoft.com/new...reviewFrame.as
p?
ICP=msdn&sLCID=us&sgroupURL=microsoft.public.dotne t.framewo
rk.aspnet&sMessageID=%253C01e601c3bef5%25240e272fe 0%
25**********@phx.gbl%253E
Here are my code:

A register.aspx includes 2 user controls.

register.aspx

<%@ Page language="c#" Codebehind="register.aspx.cs"
AutoEventWireup="false" Inherits="web.register" %>
<%@ Register TagPrefix="web" TagName="top" Src="_top.ascx"
%>
<%@ Register TagPrefix="web" TagName="left"
Src="_left.ascx" %>
<%@ Register TagPrefix="web" TagName="bottom"
Src="_bottom.ascx" %>
<%@ Register TagPrefix="web" TagName="register"
Src="_register.ascx" %>

<form runat="server" method="post" ID="Form13">
<web:top ID="top1" runat="server" />
<table align="center" width="780" border="0"
cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="140">
<web:left ID="left1" runat="server" />
</td>
<td width="640">
<web:register ID="register1" runat="server" />
</td>
</tr>
<web:bottom ID="bottom1" runat="server" />
</form>

You can see that I put the form tag on a single aspx page
which includes several user controls and each of them has
a form to submit.

_left.ascx

<table width="100%" border="1" bordercolor="#9999e7"
cellspacing="0" cellpadding="2">
<tr bgcolor="#9999e7" align="middle">
<td>user register</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tbody>
<tr>
<td width="5">&nbsp;</td>
<td nowrap>user name:</td>
<td>

<asp:TextBox id="username" runat="server"
CssClass="form" Width="70px"></asp:TextBox>

<asp:RequiredFieldValidator id="RequiredUserName"
runat="server" ErrorMessage="pls enter user name!"
Display="None" EnableViewState="False"
ControlToValidate="username"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td width="5">&nbsp;</td>

<td>Password:</td>
<td>

<asp:TextBox id="PassWord" runat="server"
Width="70px" CssClass="form"
TextMode="Password"></asp:TextBox>

<asp:RequiredFieldValidator id="RequiredPassword"
runat="server" ErrorMessage="Pls enter password!"
Display="None" EnableViewState="False"
ControlToValidate="PassWord"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td width="5">&nbsp;</td>

<td><asp:button id="ibtnLogin" runat="server"
text="Submit"></asp:button>&nbsp;</td>
<td><a href="lostpassword.aspx" target="_blank">Lost
password</a></td>
</tr>
<tr>
<td width="5">&nbsp;</td>
<td colspan="2"><asp:ValidationSummary
id="ValidationSummary"
runat="server" ShowSummary="False" ShowMessageBox="True"
EnableViewState="False"></asp:ValidationSummary>

<asp:Label id="labErrorMSG" runat="server"
CssClass="node"></asp:Label>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
_register.ascx

It also has a register form.

Here is the _register.ascx.cs

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the
page here
if(!IsPostBack)
{
this.Bind_New();
}
}

Here is the _left.ascx.cs

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the
page here
}

I am not sure how to write code for these 2 Page_Load and
PostBack.

Thanks for any kind help
Nov 18 '05 #1
0 1065

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

Similar topics

2
by: Matt | last post by:
How to pass data back and forth between ASP and JSP page? Let's say I have Java objects, how to pass the data back to ASP page?? Or ASP has data, how to pass the data to JSP page?? Please...
7
by: Matt | last post by:
In ASP, when we pass data between pages, we usually pass by query string. If we pass data by query string, that means we need to use submit button, not by regular button, and the form will pass to...
3
by: Nath | last post by:
Please help!? I am new to writing html, javascript, pretty new to MySQL but quite proficient at writing Perl and i'm a quick learner. I am building a database driven website and i am a little...
8
by: George Hester | last post by:
In a page I have when the user left-clicks the page a Input box for a form gets the focus. But if the user right-clicks the page the Input box is not getting the focus. I'd like the Input box to...
4
by: Fred | last post by:
Hi, i know how to pass a value from Javascript to ASP with a hidden field into a form and submitting it, or with cookies, but here i have to pass a lot of data in an array. There is a list of...
5
by: pbearne | last post by:
Hi guys I am trying to this function below I have a web form with a load of inputs text boxs etc and i need to disable them So I have tried to write a function I can call and get the...
4
by: ryang | last post by:
I'm sure this is an easy one for you old pros? I am using filemaker to browse some records, and I have created a button in my filemaker layout that launches a web browser with a certain url. Right...
19
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.