ObjectDataSource field accessing using C#
Posted on 2007-11-16
Using Visual Web Developer 2005 Express and concentrating on C#
My C# knowledge is limited but want to do this in C# if possible, if its not it would at least let me sleep tonight.
I have added a ObjectDataSource and pointed a Formview component to it successfully (and it works !!!)
In the C# Page_Load i want to access a field in the ObjectDataSource and have not the foggiest idea how to do it, i don't just want to DataBind the field i want to get it into a String so i can beat up the value, whisk it slightly then eventually stuff it out again.
I have been able to create a new SqlConnection and get the field that way its just that i'm annoyed that i can't figure out how to get the field that is already available on the ASP component !
protected void Page_Load(object sender, EventArgs e)
string WhatsTheValue = ObjectDataSource1["GIVEMETHESTUPIDVALUE"];