Click here to Skip to main content
15,895,667 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: XML file error Pin
Kannan Ar7-Nov-08 22:39
professionalKannan Ar7-Nov-08 22:39 
QuestionAsynchronous postback problem Pin
krishnaveer7-Nov-08 20:18
krishnaveer7-Nov-08 20:18 
QuestionHow to add new server controls by javascript Pin
goldenchance7-Nov-08 14:26
goldenchance7-Nov-08 14:26 
AnswerRe: How to add new server controls by javascript Pin
Sandeep Akhare7-Nov-08 20:16
Sandeep Akhare7-Nov-08 20:16 
QuestionHelp with FileUpload(Avoid duplication) Pin
SreeluMandiga7-Nov-08 10:31
SreeluMandiga7-Nov-08 10:31 
QuestionAssociating ProgressBar with a method Pin
Ekjon7-Nov-08 5:37
Ekjon7-Nov-08 5:37 
AnswerRe: Associating ProgressBar with a method Pin
Abhishek Sur7-Nov-08 8:13
professionalAbhishek Sur7-Nov-08 8:13 
Questionerror in cascading dropdownlist Pin
strawberrysh7-Nov-08 5:23
strawberrysh7-Nov-08 5:23 
Hi
i have two dropdownlist.i bind somthing to first dropdownlist from database.I want when I select an item from dropdownlist1 see some item in dropdownlist2 .but when i select item from dropdownlist1 ,I give this error.
i wrote this code but give error :
error: invalid attempt to call FeildCount when reader is cloused
for binding item to dropdownlist1 i wrote this code in page load:
cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "dbo.StoredProcedure19";
                con.Open();
                SqlDataReader dr = cmd.ExecuteReader();
                if (dr.Read())
                {
                    DropDownList1.DataSource = dr;
                    DropDownList1.DataTextField = "category_name";
                    DropDownList2.DataValueField = "category_id";
                    DropDownList1.DataBind();
                    con.Close();
                    dr.Close();
                }

in select index change of dropdownlist1
protected void drse(object sender, EventArgs e)
    {
        SqlConnection con = new SqlConnection(connectionstring);
        SqlCommand cmd = new SqlCommand();
        cmd.Connection = con;
      
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "dbo.StoredProcedure21";
                cmd.Parameters.AddWithValue("@category_id", DropDownList1.SelectedItem.Value.ToString());
                con.Open();
                SqlDataReader dr = cmd.ExecuteReader();
                if (dr.Read())
                {
                    DropDownList2.DataSource = dr;
                    DropDownList2.DataTextField = "type";
                    DropDownList2.DataValueField = "id_type";
                    DropDownList1.DataBind();
                    con.Close();
                    dr.Close();
                }
}

<asp:dropdownlist id="DropDownList1" runat="server" meta:resourcekey="DropDownList1Resource1" datavaluefield="category_id" datatextfield="category_name" autopostback="True" __designer:wfdid="w10" onselectedindexchanged="drse" xmlns:__designer="#unknown" xmlns:meta="#unknown" xmlns:asp="#unknown">

 <asp:dropdownlist id="DropDownList2" runat="server" meta:resourcekey="DropDownList2Resource1" datavaluefield="id_type" datatextfield="type" __designer:wfdid="w12">     </asp:dropdownlist></asp:dropdownlist>


AnswerRe: error in cascading dropdownlist Pin
Parwej Ahamad7-Nov-08 5:36
professionalParwej Ahamad7-Nov-08 5:36 
GeneralRe: error in cascading dropdownlist Pin
strawberrysh7-Nov-08 6:52
strawberrysh7-Nov-08 6:52 
GeneralRe: error in cascading dropdownlist Pin
Parwej Ahamad7-Nov-08 7:17
professionalParwej Ahamad7-Nov-08 7:17 
GeneralRe: error in cascading dropdownlist Pin
strawberrysh7-Nov-08 8:39
strawberrysh7-Nov-08 8:39 
AnswerRe: error in cascading dropdownlist Pin
farzaneh ansari11-Nov-08 18:27
farzaneh ansari11-Nov-08 18:27 
QuestionAn ASP.Net Question Pin
Xiaoming Qian7-Nov-08 4:18
Xiaoming Qian7-Nov-08 4:18 
AnswerRe: An ASP.Net Question Pin
Paddy Boyd7-Nov-08 5:18
Paddy Boyd7-Nov-08 5:18 
QuestionFormatting date to remove the time on a DetailsView BoundField Pin
jzonthemtn7-Nov-08 3:31
jzonthemtn7-Nov-08 3:31 
AnswerRe: Formatting date to remove the time on a DetailsView BoundField Pin
J4amieC7-Nov-08 3:34
J4amieC7-Nov-08 3:34 
GeneralRe: Formatting date to remove the time on a DetailsView BoundField Pin
jzonthemtn7-Nov-08 3:44
jzonthemtn7-Nov-08 3:44 
AnswerRe: Formatting date to remove the time on a DetailsView BoundField Pin
NeverHeardOfMe7-Nov-08 4:02
NeverHeardOfMe7-Nov-08 4:02 
GeneralRe: Formatting date to remove the time on a DetailsView BoundField Pin
jzonthemtn7-Nov-08 5:22
jzonthemtn7-Nov-08 5:22 
AnswerRe: Formatting date to remove the time on a DetailsView BoundField Pin
Sneha Bisht7-Nov-08 21:02
Sneha Bisht7-Nov-08 21:02 
QuestionJQuerry help! Pin
papy-boom7-Nov-08 2:55
papy-boom7-Nov-08 2:55 
QuestionSave check boxes data Pin
kjosh1237-Nov-08 2:44
kjosh1237-Nov-08 2:44 
AnswerRe: Save check boxes data Pin
Paddy Boyd7-Nov-08 5:20
Paddy Boyd7-Nov-08 5:20 
Questionlong text in Grid Pin
kjosh1237-Nov-08 2:43
kjosh1237-Nov-08 2:43 

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.