I have a Application I neaver work on Web Form so simple I have to send a data to html page..
in the First page I have a Button and a listBox
<asp:Button ID="Button12" runat="server" Text="Button" OnClick="Button12_Click" />
<asp:ListBox ID="ListBox1" runat="server"></asp:ListBox>
So when I click the button it should send list of user to the list box
protected void Button12_Click(object sender, EventArgs e)
{
ApplicationDbContext obk = new ApplicationDbContext();
foreach (var item in obk.Users.ToList())
{
ListBox1.Text = item.UserName;
}
First it is not showing the data in the list box
second I want to send a data from C# to Html like in MVC we have ViewData["jsad"] so is there any thing in Web Form I am new in Web Forms I work on MVC so I am so confuse
And you can give me any good web link for tutorial for Web form ,