A
apandapion
I'm working with csharp and .net for the first time, and I've had a
fair amount of luck. I started with the MSDN "Walkthrough : Creating a
Distributed Application" tutorial and expanded from there, adding state
management and other assorted things.
So I have a lot of code that looks like this:
private void DataGrid1_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
/* snip lots of code that I've written */
}
It wraps a dataset obtained through a pretty standard two function
GetTable/UpdateTable web service.
I want to reuse this code, and not in the braindead
cut/paste/alter/suffer manner. Under the .net architecture, what's the
best way to go about it? Write my own class that inherits from
DataGrid? I tried that, and it encapsulates the code nicely, but it
also causes lots of errors from the aspx file that I'm not sure how to
handle. Do I have to write a web custom control? Do I lose access to
the designer in doing so?
fair amount of luck. I started with the MSDN "Walkthrough : Creating a
Distributed Application" tutorial and expanded from there, adding state
management and other assorted things.
So I have a lot of code that looks like this:
private void DataGrid1_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
/* snip lots of code that I've written */
}
It wraps a dataset obtained through a pretty standard two function
GetTable/UpdateTable web service.
I want to reuse this code, and not in the braindead
cut/paste/alter/suffer manner. Under the .net architecture, what's the
best way to go about it? Write my own class that inherits from
DataGrid? I tried that, and it encapsulates the code nicely, but it
also causes lots of errors from the aspx file that I'm not sure how to
handle. Do I have to write a web custom control? Do I lose access to
the designer in doing so?