Click here to Skip to main content
15,898,789 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: CSS menu change in Asp.net Pin
mark_me26-Jul-09 16:55
mark_me26-Jul-09 16:55 
GeneralRe: CSS menu change in Asp.net Pin
Christian Graus26-Jul-09 20:07
protectorChristian Graus26-Jul-09 20:07 
GeneralRe: CSS menu change in Asp.net Pin
mark_me27-Jul-09 6:06
mark_me27-Jul-09 6:06 
Questionbest way to update an xml file once per day on web application? Pin
dd31415926-Jul-09 7:02
dd31415926-Jul-09 7:02 
AnswerRe: best way to update an xml file once per day on web application? Pin
Abhishek Sur26-Jul-09 9:44
professionalAbhishek Sur26-Jul-09 9:44 
GeneralRe: best way to update an xml file once per day on web application? Pin
dd31415926-Jul-09 11:21
dd31415926-Jul-09 11:21 
AnswerRe: best way to update an xml file once per day on web application? Pin
Mike Ellison26-Jul-09 13:38
Mike Ellison26-Jul-09 13:38 
Questionasp.net display data in gridview [modified] Pin
solo_gaurav26-Jul-09 5:18
solo_gaurav26-Jul-09 5:18 
hey all.. i need a guidence to my problem im facing
i want to display data in gridview binded to a sql datasource
but the problem part is i want to bind a field of that datasource to a dropdownlist and when a item is selected in that dropdownlist then correcposnding to that data will be displayed in gridview...
i have done the binding of datasource and gridview... but not of cropdownlist...plz help buddies... i'll be very grateful ... thanks in advance Smile | :)
here is my code which im using
protected void  DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {  ///int count=0;
        con = new SqlConnection("Data Source=.;Initial Catalog=abc;Integrated Security=True");


        
        
            con = new SqlConnection("Data Source=.;Initial Catalog=abc;Integrated Security=True");
            cmd = new SqlCommand("select * from salescounts where ='"+DropDownList1.Text+"'", con);
            con.Open();
            SqlDataReader dr = cmd.ExecuteReader();
            if (dr.HasRows)
            {
                GridView1.DataSource = dr;
                GridView1.DataBind();
                Label1.Text = "Result found:" + GridView1.Rows.Count;


            }
            else
            {
                Label1.Text = "not found";
            }

            con.Close();
        
}


modified on Sunday, July 26, 2009 12:51 PM

AnswerRe: asp.net display data in gridview Pin
Abhijit Jana26-Jul-09 6:58
professionalAbhijit Jana26-Jul-09 6:58 
GeneralRe: asp.net display data in gridview Pin
solo_gaurav26-Jul-09 7:36
solo_gaurav26-Jul-09 7:36 
GeneralRe: asp.net display data in gridview Pin
Abhijit Jana26-Jul-09 8:40
professionalAbhijit Jana26-Jul-09 8:40 
GeneralRe: asp.net display data in gridview Pin
solo_gaurav26-Jul-09 10:28
solo_gaurav26-Jul-09 10:28 
GeneralRe: asp.net display data in gridview Pin
Abhijit Jana26-Jul-09 11:11
professionalAbhijit Jana26-Jul-09 11:11 
AnswerRe: asp.net display data in gridview Pin
Paul Conrad26-Jul-09 10:57
professionalPaul Conrad26-Jul-09 10:57 
Questionin my system mechine.config is not there in the bellow path.why ? how to create Pin
Ramesh Reddy1111126-Jul-09 3:37
Ramesh Reddy1111126-Jul-09 3:37 
AnswerRe: in my system mechine.config is not there in the bellow path.why ? how to create Pin
Manas Bhardwaj26-Jul-09 3:59
professionalManas Bhardwaj26-Jul-09 3:59 
QuestionRetaining the string entered in File Upload Control Pin
meeram39526-Jul-09 3:22
meeram39526-Jul-09 3:22 
AnswerRe: Retaining the string entered in File Upload Control Pin
Abhishek Sur26-Jul-09 10:39
professionalAbhishek Sur26-Jul-09 10:39 
GeneralRe: Retaining the string entered in File Upload Control Pin
meeram39526-Jul-09 21:23
meeram39526-Jul-09 21:23 
GeneralRe: Retaining the string entered in File Upload Control Pin
Abhishek Sur26-Jul-09 21:54
professionalAbhishek Sur26-Jul-09 21:54 
QuestionSession Variables Mysteriously Go Null Pin
PDTUM25-Jul-09 16:27
PDTUM25-Jul-09 16:27 
AnswerRe: Session Variables Mysteriously Go Null Pin
Abhijit Jana25-Jul-09 20:45
professionalAbhijit Jana25-Jul-09 20:45 
GeneralRe: Session Variables Mysteriously Go Null Pin
PDTUM26-Jul-09 4:20
PDTUM26-Jul-09 4:20 
AnswerRe: Session Variables Mysteriously Go Null Pin
Abhishek Sur25-Jul-09 21:31
professionalAbhishek Sur25-Jul-09 21:31 
AnswerRe: Session Variables Mysteriously Go Null Pin
Manas Bhardwaj25-Jul-09 22:58
professionalManas Bhardwaj25-Jul-09 22:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.