Hello Friends, I have a problem in redirect a page.i m using C#.net 2005 .i hv a dropdown list which is bind data from database Like State when i m selecting an item in dropdownlist then the corrospondin District should be come in the second dropdownlist. butit never comes.. there is a problem comes"The specified URL can not be found" I m writing the code below for beter understand. I m also set the Autopostback property =true in dropdownlist. protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { con.Open(); SqlCommand com = new SqlCommand("select State from StateInfo order by StateName asc", con); dr = com.ExecuteReader(); while (dr.Read() == true) { drp_regionname.Items.Add(dr[0].ToString()); } dr.Close(); } } protected void drp_regionname_SelectedIndexChanged(object sender, EventArgs e) { string RegionName = drp_regionname.SelectedValue.ToString(); SqlCommand com1 = new SqlCommand("select district from DistrictInfo where StateName ='" + RegionName + "'", con); con.Open(); dr = com1.ExecuteReader(); while (dr.Read()) { drp_unitname.Items.Add(dr[0].ToString()); } dr.Close(); con.Close(); } This code is running fine in local server but not running in Remote server.. Plz help me....... Thanks ...
Parameswar Mal
Posts
-
Problem in page Redirect -
Problem in Validation ControlHello Friends, I am using Asp.net 2.0 with C#. I have Three textbox ..,txtname,txtAddress,txtphno,and each textbox has Requiredfield Validator.I am inserting Record and show record throuh 2 button ie. Save and ShowRecord button My problem is when i want show record through Textname textbox putting name(bind through DataReader) and click on show record then the message comes that other two textbox means txtaddress,txtphon can not blank which i have given in error message. When i remove validation control then record will be shown in textboxes. Plz give me some Idea. parameswar mal
-
I want help on Sql queryHi Friends I have a problems I have a table Employee two fields Name, Age Name Datatype is varchar() Age Datatype is Int() the table look likes this Name.........Age Ram.............23 Steve............22 when i swap this two fields using this query"update Employee set Age = Ename,Ename=Age;' then the error occured error is "Syntax error converting the varchar value 'Ram' to a column of data type int." If i changed the datatype of Age is "Int" to "Varchar" then the query runs. My question is if i don't changed the datatype then how i swap the two fields Plz help me....
-
Sql queryhi want to find the out puts There are 2 fields namely name,mark The following are the values in the field name....mark A...........10 A...........10 B...........20 C...........15 C............5 my output should be in the form :----- name...........mark A................20 B................20 C................10 Please write a query for this ???
-
What is the major drawback in C# .NET? -
How 2 Fix the Form Size in Vb.Net?:(Actually I created a form, which is a MDI. I then took a form(form 2),which is a child form. Now when i run the application the child form (form 2) comes within the MDI. But now the problem is how i can fix the child form inside the MDI. I tried the following code form2.minimize=false form2.maximize=false when i double click the status bar the form size changes so it moves within the MDI.Now how can i fix it ?.
-
Resolution Problem.Hi, I am using vs.net with windows application. My screen resolution is 1024 by 768 pixels. My form size is fixed to 1024 by 740. What i want is if i increase the resloution form will fit to the screen automatically. If i decrease the resolution, the scrollbars have to be appear. How to this. ? Plz help me urgent.
-
Why we use MissingSchemaAction in vb.net 2005?I am newly in visual studio 2005. Why we use MissingSchemaAction ? And what is its meaning?
-
How to insert jpeg file into sql server 2000 And how to retrieve to .net formHi friends, I am working in .net 2005 and sql server 2000 use as back end. My problem is how to insert jpeg file into database and how to retrieve it into .net form.:omg:
-
How to convert digit to word in Visual Studio 2005 beta 2.0 [modified]Hi friends, Now i am working in visual studio 2005 beta 2.0.and sql server 2000 in back end. My problem is i want to convert digit to words Example: 150 as One Hundred Fifty Rupees. Plz help me any code. -- modified at 3:50 Wednesday 8th November, 2006