title: How to send Data from Funcation to Html page list in Web Form
body: <p>I have a Application I neaver work on Web Form so simple I have to send a data to html page..</p>
  
  <p>in the First page I have a Button and a listBox </p>
  
  <pre><code>&lt;asp:Button ID="Button12" runat="server" Text="Button" OnClick="Button12_Click" /&gt;
  &lt;asp:ListBox ID="ListBox1" runat="server"&gt;&lt;/asp:ListBox&gt;
  </code></pre>
  
  <p>So when I click the button it should send list of user to the list box </p>
  
  <pre><code>protected void Button12_Click(object sender, EventArgs e)
  {
      ApplicationDbContext obk = new ApplicationDbContext();
      foreach (var item in obk.Users.ToList())
      {
          ListBox1.Text = item.UserName;
  
      }
  </code></pre>
  
  <p>First it is not showing the data in the list box </p>
  
  <p>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 </p>
  
  <p>And you can give me any good web link for tutorial for Web form ,</p>