Hi,
I have this question below but still cannot fix it.
http://communities.microsoft.com/new...reviewFrame.as
p?
ICP=msdn&sLCID= us&sgroupURL=mi crosoft.public. dotnet.framewo
rk.aspnet&sMess ageID=%253C01e6 01c3bef5%25240e 272fe0%
25**********@ph x.gbl%253E
Here are my code:
A register.aspx includes 2 user controls.
register.aspx
<%@ Page language="c#" Codebehind="reg ister.aspx.cs"
AutoEventWireup ="false" Inherits="web.r egister" %>
<%@ Register TagPrefix="web" TagName="top" Src="_top.ascx"
%>
<%@ Register TagPrefix="web" TagName="left"
Src="_left.ascx " %>
<%@ Register TagPrefix="web" TagName="bottom "
Src="_bottom.as cx" %>
<%@ Register TagPrefix="web" TagName="regist er"
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="#9 999e7"
cellspacing="0" cellpadding="2" >
<tr bgcolor="#9999e 7" align="middle">
<td>user register</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0"
cellpadding="0" >
<tbody>
<tr>
<td width="5">  ;</td>
<td nowrap>user name:</td>
<td>
<asp:TextBox id="username" runat="server"
CssClass="form" Width="70px"></asp:TextBox>
<asp:RequiredFi eldValidator id="RequiredUse rName"
runat="server" ErrorMessage="p ls enter user name!"
Display="None" EnableViewState ="False"
ControlToValida te="username"> </asp:RequiredFie ldValidator>
</td>
</tr>
<tr>
<td width="5">  ;</td>
<td>Password: </td>
<td>
<asp:TextBox id="PassWord" runat="server"
Width="70px" CssClass="form"
TextMode="Passw ord"></asp:TextBox>
<asp:RequiredFi eldValidator id="RequiredPas sword"
runat="server" ErrorMessage="P ls enter password!"
Display="None" EnableViewState ="False"
ControlToValida te="PassWord"> </asp:RequiredFie ldValidator>
</td>
</tr>
<tr>
<td width="5">  ;</td>
<td><asp:butt on id="ibtnLogin" runat="server"
text="Submit"></asp:button>&nbs p;</td>
<td><a href="lostpassw ord.aspx" target="_blank" >Lost
password</a></td>
</tr>
<tr>
<td width="5">  ;</td>
<td colspan="2"><as p:ValidationSum mary
id="ValidationS ummary"
runat="server" ShowSummary="Fa lse" ShowMessageBox= "True"
EnableViewState ="False"></asp:ValidationS ummary>
<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(objec t sender, System.EventArg s e)
{
// Put user code to initialize the
page here
if(!IsPostBack)
{
this.Bind_New() ;
}
}
Here is the _left.ascx.cs
private void Page_Load(objec t sender, System.EventArg s 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