In ASp.net Page I Need To Know How To Maintain The Value Of A Particular Label Assign By the HTML Button Click. after Postback Done.
with out converting label to textbox, not using hidden field or session
Detailed Code
<table>
<tr>
<td><asp:Label ID="lbl1" runat="server" ClientIDMode="Static">Before Changing</asp:Label></td>
<td><asp:Label id="lbl2" runat="server" ClientIDMode="Static"></asp:Label></td>
<td><asp:TextBox ID="txtbox" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td><asp:Button ID="btnasp" runat="server" Text="ASP Button" Height="50px" Width="150px" OnClick="btnasp_Click"/></td>
<td><input type="button" id="btnhtml" value="HTML Button" onclick="showlabel()" style="height:50px; width:150px"/></td>
</tr>
</table>
Script
<script type="text/javascript">
function showlabel() {
$('#lbl1').text("After Changing");
}
</script>
cs code
protected void btnasp_Click(object sender, EventArgs e)
{
txtbox.Text = lbl1.Text;
}
OutPut
[label"Before Changing"] [txtbox]
[asp button] [html button]
If I click HTML Button
The Label Text Before Changing Is Change To After Changing
Then I Click The ASP Button After Changing Value is show in textbox
This Is Done By With Out adding value in Hidden Field and Not Using the Server Control to Html Button,
How It Possible Plz Help Me ...