TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Parameswar Mal
NA
2
0
Redirect problem in Page
Apr 21 2008 1:36 PM
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 ...
Reply
Answers (
1
)
Browser Opens same window from Different Link
HOw to create a Media player