ASP.NET - SELECT THE VALUE IN DROPDOWNLIST

Asked By Rohini Kuchadi
04-Feb-12 01:19 AM
I HAVE A DROPDOWLLIST BOX.I HAVE ADDEDED SONGS,SPOTS,LINKS.ALL AS VALUES TO THAT DROPDOWNLIST BOX. NOW WHAT I WANT IS, WHEN I SELECT SONGS IN DROPDOWNLIST AND CLICK ON SUBMIT BUTTON, IT SHOULD DISPLAY ME THE LIST OF SONGS PRESENT IN THE DATABASE. sAME THING I WANT WHEN I SELECT SPOTS,LINKS,ALL ALSO.
  dipa ahuja replied to Rohini Kuchadi
04-Feb-12 03:23 AM
 protected void Button9_Click(object sender, EventArgs e)
  {
  int id = int.Parse(DropDownList1.SelectedItem.ToString());
 
  string q = "Select * from table1 where songID=" + id;
  SqlDataAdapter da = new SqlDataAdapter(q, "connectionSTring");
  DataTable dt = new DataTable();
  da.Fill(dt);
 
  GridView1.DataSource = dt;
  GridView1.DataBind();
  }
 
 
Create New Account
help
Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B A) What is scavenging? (B) What are different types of caching using cache object of ASP.NET? (B) How can you cache different version of same page using ASP.NET cache object? (A) How will implement Page Fragment Caching? (B) Can you compare ASP.NET sessions with classic ASP? (B) Which are the various modes of storing ASP.NET session
v4.dbtutorials.com / sql / binding-a-menu-navigation-control-to-an-xml-sitemap-file-in-asp-net / Hope This will help you HI try this Horizontal Menu: Vertical Menu: <? xml version = " 1 Some new products " / > < / siteMapNode > < siteMapNode title = " Services" description = " Our Services" > < siteMapNode url = " Service1.aspx" title = " ASP.NET Consulting" description = " Best ASP.NET Consulting" / > < siteMapNode url = " Service2.aspx" title = " ASP.NET Training" description = " Best ASP.NET Training" / > < / siteMapNode > < / siteMapNode > < / siteMap > private void CreateMenuControl() { Menu1.DataSource = GetSiteMapDataSource
ASP.NET Caching Basics ASP.NET Caching Basics by Peter A. Bromberg, Ph.D. Peter Bromberg "If people had understood how Caching? Caching is one of the least used and misunderstood, yet most powerful features of ASP.NET - - both in the 1.1 flavor, and even more so in ASP.NET 2.0. Most developers do not get into the details of harnessing the power of
t server side anymore. Hi, try the following article and it solves your answer. . . The ASP.NET Repeater is a basic container control that allows you to create custom lists from any data available to the page. It's a handy control, especially since most ASP NET pages that display data need to repeat the same kinds of data over and over of repeater tool would you need? Let's consider the most obvious solution first—the ASP.NET Repeater control. The Repeater control does exactly what its name suggests—it repeats the specified of data by default. You determine the final layout of the generated markup by creating ASP.NET templates and explicitly adding markup that separates one row from the next. The canonical example
using LINQ in asp.net 3.5 ASP.NET hi friends, please give using LINQ in asp.net 3.5 examples, eg: table employee fields eid, ename, esal how to write asp.net using LINQ. please give the steps and code, thanks. you can right it like this