i want to display default profile image of the user when user is created and when he upload pictures he should get profile image from database
i tried to bind image url from database using eval tag its working but its not displaying default image when new user is created
i am not using any generic handler for this i am using stored procedure for doing this
can anyone help me how to do this thanks in advance

Bhabani prasad Dash168 reputationPosted Jun 22, 2013, 12:36 AM EDT
protected void Loaddata()
{
con.Open();
cmd = new SqlCommand("select gender,firstname,emailid,address,mobileno,CONVERT(VARCHAR(10),dateofbirth,111)as dateofbirth ,city,image,state from User_Information where firstname='" + Session["uid"].ToString() + "'", con);
// cmd = new SqlCommand("select * from User_Information", con);
da = new SqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds);
ddl_gender.SelectedValue = ds.Tables[0].Rows[0]["gender"].ToString();
txt_name.Text = ds.Tables[0].Rows[0]["firstname"].ToString();
txt_email.Text = ds.Tables[0].Rows[0]["emailid"].ToString();
txt_address.Text = ds.Tables[0].Rows[0]["address"].ToString();
txt_mob.Text = ds.Tables[0].Rows[0]["mobileno"].ToString();
txt_bday.Text = ds.Tables[0].Rows[0]["dateofbirth"].ToString();
txt_city.Text = ds.Tables[0].Rows[0]["city"].ToString();
img_myprofile.ImageUrl = ds.Tables[0].Rows[0]["image"].ToString().Replace("~/", "");
txt_state.Text = ds.Tables[0].Rows[0]["state"].ToString();
if (img_myprofile.ImageUrl == "")
{
img_myprofile.ImageUrl = "~/user.jpg";
}
}
Bhabani prasad Dash168 reputationPosted Jun 22, 2013, 12:38 AM EDT
Note:user.jpg or any other default image do u want to give first added to ur projet
Kavita Pharde44 reputationPosted Jun 24, 2013, 1:54 AM EDT
Bhabani prasad Dash168 reputationPosted Jun 24, 2013, 1:58 AM EDT
Bhabani prasad Dash168 reputationPosted Jun 24, 2013, 2:07 AM EDT