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
ashima kukreja
NA
19
14.1k
asp.net
Jun 1 2013 6:17 AM
SqlCommand cmd = new SqlCommand("select email ,phone,fname,lname, CurrentLocation , Gender , DateOfBirth , landline,address,category , qualification , EducationSpecialization , InstituteName , coursetype , TotalExperience , CurrentSalary , jobtitle , companyname , IndustryofComapny , FunctionAreaOfJob , DesiredLocation , DesiredSalary , DesiredIndustry,name from UserInfo where userid=@userid", cn);
cmd.Parameters.Add(new SqlParameter("@userid", Session["userid"]));
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
if (dr[20] != DBNull.Value)
{
ddldesiredlocation.SelectedItem.Text = dr.GetString(20).ToString();
}
else
{
ddldesiredlocation.SelectedItem.Text = "";
}
if (dr[21] != DBNull.Value)
{
ddldesiredsal.SelectedItem.Text = dr.GetString(21).ToString();
}
else
{
ddldesiredsal.SelectedItem.Text = "";
}
if (dr[22] != DBNull.Value)
{
ddldesiredindustry.SelectedItem.Text = dr.GetString(22).ToString();
}
else
{
ddldesiredindustry.SelectedItem.Text = "";
}
SqlCommand cmd1 = new SqlCommand(" select name from UserInfo where userid=@userid", cn);
{ here i am getting a error please close the datareader.how to resolve this error.plz help . i want that is resume is there gridview is shown otherwise not.
cmd1.Parameters.Add(new SqlParameter("@userid", Session["userid"]));
SqlDataAdapter da = new SqlDataAdapter(cmd1);
if (dr[0] != DBNull.Value)
{
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
Reply
Answers (
4
)
AGILE methodology
IDNTIFYING INDEX