Click here to Skip to main content
15,898,134 members

Comments by VandrenSKL (Top 16 by date)

VandrenSKL 7-Mar-16 3:56am View    
For the code i show is only able to export all not selected user. Please advice?
VandrenSKL 7-Mar-16 3:47am View    
Yeah as so far, is worked as so far i thought needed to modify at button there but actually is page load. thanks guys
VandrenSKL 29-Feb-16 2:34am View    
Hi, is it the source code tab design in visual that you mention?
VandrenSKL 25-Feb-16 5:24am View    
Deleted
public partial class DatabaseEntry : System.Web.UI.Page
{

public string strConnString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
string str;
SqlCommand com;

protected void Page_Load(object sender, EventArgs e)
{



SqlConnection con = new SqlConnection(strConnString);

con.Open();
str = ("select * from AspNetUsers where UserName = ('" + Session["UserName"] + "')");
com = new SqlCommand(str, con);
object obj = Session["UserName"];

SqlDataReader reader = com.ExecuteReader();
reader.Read();

Label1.Text = reader["UserName"].ToString();


if (!this.IsPostBack)
{
this.BindGrid();
}




}

.............

}

This is my page load code, still can't find where's the bugs as all column and data are match?
VandrenSKL 30-Apr-15 4:16am View    
I'm getting this error after add into the line before the fill()

"ExecuteReader: CommandText property has not been initialized"