I am using this variable from the code behind :
public string UserID; //globally declare the UserId
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
MembershipUser myObject = Membership.GetUser();
UserID = myObject.ProviderUserKey.ToString();
}
I am trying to use the variable in the INSERT command in the aspx file but it seems that the following command does not work,any ideas why?
InsertCommand="INSERT INTO table (column1, column2) VALUES (value1, '<%=UserID %>')"
Thanks!
public string UserID; //globally declare the UserId
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
MembershipUser myObject = Membership.GetUser();
UserID = myObject.ProviderUserKey.ToString();
}
I am trying to use the variable in the INSERT command in the aspx file but it seems that the following command does not work,any ideas why?
InsertCommand="INSERT INTO table (column1, column2) VALUES (value1, '<%=UserID %>')"
Thanks!