R
robopro
I've been coding in asp.net (vb) for a while now and I miss being able
to create functions in modules (like in ms access) so that I don't
need to reuse my code in all the code behind pages. I know that
creating classes is the accepted way to get around this in .net but I
have not been able to find documentation that can get me to where I
want to be. I'd like to have a class that will have a couple data
centric functions, like a function to execute an update string in sql,
or a function to return a dataset or datatable.
the only classes I've seen examples of return things like text boxes,
I'm looking to perform a database action and either return success or
return the result of a query.
Has anyone done this? or does everyone have multiple copies of blocks
of code that just connect to a db and return the datasets?
to create functions in modules (like in ms access) so that I don't
need to reuse my code in all the code behind pages. I know that
creating classes is the accepted way to get around this in .net but I
have not been able to find documentation that can get me to where I
want to be. I'd like to have a class that will have a couple data
centric functions, like a function to execute an update string in sql,
or a function to return a dataset or datatable.
the only classes I've seen examples of return things like text boxes,
I'm looking to perform a database action and either return success or
return the result of a query.
Has anyone done this? or does everyone have multiple copies of blocks
of code that just connect to a db and return the datasets?