Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
0 Points
5 Posts
Dec 14, 2010 11:35 PM|LINK
Hi Santhosh, thank you for your reply.
here's what i did, but i'm getting this error (the name 'e' does not exist in the current context)
public void InstantiateIn(System.Web.UI.Control container) {
// Create the content for the different row types. switch (templateType) { case DataControlRowType.Header: // Create the controls to put in the header
break; case DataControlRowType.DataRow: // Create the controls to put in a data row string dataKeyValue = DataBinder.Eval(e.Row.DataItem, "au_id").ToString();
break; case DataControlRowType.Footer:
default: // Insert code to handle unexpected values. break; } }
heyyou
0 Points
5 Posts
Re: How do I get the datakey for a DataControlRowType.DataRow when a TemplateField is created in ...
Dec 14, 2010 11:35 PM|LINK
Hi Santhosh,
thank you for your reply.
here's what i did, but i'm getting this error (the name 'e' does not exist in the current context)
public void InstantiateIn(System.Web.UI.Control container)
{
// Create the content for the different row types.
switch (templateType)
{
case DataControlRowType.Header:
// Create the controls to put in the header
break;
case DataControlRowType.DataRow:
// Create the controls to put in a data row
string dataKeyValue = DataBinder.Eval(e.Row.DataItem, "au_id").ToString();
break;
case DataControlRowType.Footer:
default:
// Insert code to handle unexpected values.
break;
}
}