Multi View (Source Code ASP.NET)
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
<asp:View ID="View1" runat="server">
<table>
<tr>
<td width="200" align="center">
<asp:Label ID="lblNameINS" runat="server" Text="User Name "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtNameINS" runat="server" Width="200"></asp:TextBox>
</td>
</tr>
<tr>
<td width="200" align="center">
<asp:Label ID="lblAddINS" runat="server" Text="User Address "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtAddINS" runat="server" Width="300"></asp:TextBox>
</td>
</tr>
<tr>
<td width="200" align="center">
<asp:Label ID="lblAgeINS" runat="server" Text="User Age "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtAgeINS" runat="server" Width="100"></asp:TextBox>
</td>
<td width="200" align="right"><asp:LinkButton runat="server" ID="lnkbtnINS"
Text="Go to Update" onclick="lnkbtn_Click"></asp:LinkButton></td>
</tr>
</table>
</asp:View>
<asp:View ID="View2" runat="server">
<table>
<tr>
<td width="200" align="center">
<asp:Label ID="lblNameUPD" runat="server" Text="User Name U"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtNameUPD" runat="server" Width="200"></asp:TextBox>
</td>
</tr>
<tr>
<td width="200" align="center">
<asp:Label ID="lblAddUPD" runat="server" Text="User Address U"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtAddUPD" runat="server" Width="300"></asp:TextBox>
</td>
</tr>
<tr>
<td width="200" align="center">
<asp:Label ID="lblAgeUPD" runat="server" Text="User Age U"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtAgeUPD" runat="server" Width="100"></asp:TextBox>
</td>
<td width="200" align="right">
<asp:LinkButton runat="server" ID="lnkbtnUPD"
Text="Go to Insert" onclick="lnkbtnUPD_Click"></asp:LinkButton></td>
</tr>
</table>
</asp:View>
</asp:MultiView>
protected void lnkbtn_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 1;
}
protected void lnkbtnUPD_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 0;
}
No comments:
Post a Comment