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
Nethra R S
NA
310
335.2k
Master page is loading again(twice)
Jun 22 2011 6:31 AM
Hi,
I have 3 dropdownlist controls.. To load i have written a method placed in a separate class which is static.
Here is the method and the page load event.. The master page again loads back erasing all the data to be displayed in the dropdownlist control.. Plzz help me correct me..
this is xyz.aspx:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
load_dropdownlist();
}
}
private void load_dropdownlist()
{
DataSet ds = new DataSet();
ds = PopulateControlsCls.LoadDataSet("Select ProjectID,ProjectName from ProjectDetailsMaster");
drpprojname.DataSource = ds.Tables[0];
drpprojname.DataValueField = "ProjectID";
drpprojname.DataTextField = "ProjectName";
}
==========================================================================
PopulateControlsCls is static class
public static DataSet LoadDataSet(string SQLquery)
{
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ProjectTrackingConnectionString"].ConnectionString);
SqlCommand cmd = new SqlCommand();
DataSet ds = new DataSet();
//conn = CONN;
cmd.CommandType = CommandType.Text;
cmd.CommandText = SQLquery;
SqlDataAdapter da = new SqlDataAdapter(cmd);
cmd.Connection = conn;
da.SelectCommand = cmd;
da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
da.Fill(ds);
conn.Close();
cmd = null;
return ds;
}
Reply
Answers (
2
)
Interview question 1)asp.net form authentication and authorization using web.configuration (roles) 2)using asp.net soltion explorer in top there is a apple icon have u used
Page Number & Count Like Blogs