Monday, February 20, 2012

Old asp pro trying to learn asp.net... having some problems, Help!

Hello everyone! Many thanks in advance for taking the time to help me out. I'll also apologize upfront for the longwinded email, but I seem to be really stuck in a rut. I've been writing web apps for 3+ years in ASP and am finally taking the leap into ASP.net (a bit behind the curve, i know). I have a few books and have gone over the tutorials on this site. I am realizing that the syntax (if using VB) is much the same, but also realize how much richer asp.net is in comparison to traditional ASP.

I'm having some major issues in my learning process that stem from using the tutorials and attempting to be efficient with VS2003. I feel as though I'm missing something fundamental that could be causing my problems. My area of focus right now is data access, using connections, adapters and datasets.

The tutorials on this site show all of the examples by hardcoding the data access into the ASPX page. The tutorials have me importing the proper namespaces for data and sqldata access at the top of the page. This seems to work fine and dandy if I were to be coding my pages from a standard text editor, but I would like to use the richness of the VB.NET studio gui to expedite my work.

My first problem lies if I try to manually code the data access in the private class defined for the page in the codebehind section. Because it will not allow me to import multiple namespaces, the only way I get it to work would be to include the complete namespace for the object I'm trying to use (ie: system.data.sqlclient.sqconnection). On top of this, the datasets I define aren't available as options when I try to bind them to objects in the GUI.

On the flip side, I tried to use the SQLconnection, Dataadapter, etc objects in the gui, but I can't seem to find where the code is dynamically written for these, nor how I can, for example make this sort of connection use an application-variable level connection string. The only way I can see to make this would be to define the connection for each web form, which seems silly when I'm trying to deploy each solution multiple times with different databases.

I apologize for my ignorance, as this is probably fairly simple to overcome. If someone could point out what I'm doing wrong, or point me in the right direction, I'd be very appreciative. I am sick of spinning my wheels with this, and keep getting tempted to go back to using traditional ASP, just so I can get my job done.

Thanks again,

TbldevHave you had a look at the starter kits available on this site?

ASP.NET Starter Kits|||Try these url they have all you need to get up to speed with complete application development which is different from the demos in books. The current Dotnetnuke has a solution(SLN) file that you can open that separates all the different sections of the application into Modules. Remember to download the latest verson, start with the Dotnetnuke Documentation white Papers. The other two links are to the future of Asp.net, ASP.NET 2.0 and the ease of use. Hope this helps.

http://www.dotnetnuke.com

http://lab.msdn.microsoft.com/vs2005/

http://beta.asp.net/GuidedTour/

Kind regards,
Gift Peddie

No comments:

Post a Comment