locked
Where do I place the code? RRS feed

  • Question

  • User-349319279 posted

    Hi Everyone,

    All I want to do is open a access database by constructing a connection string. Then I will need a command object. I also want to use the DataAdapter to fill an object Dataset that will in turn populate a gridview control. My question is in an asp.net application where I will be using vb.net where do I put this code in the aspx file or the aspx.vb file? Also are the ADO classes or namespaces that I will need automatically imported in to my application or do I need to manually code this? I have placed code from numerous examples into the aspx.vb file and it never works. Any help with this would be greatly appreciated. And long winded answer's are welcomed because I'm thinking there is a lot I need to know before I really undrestand what is going on in ASP.Net.

    Thursday, August 7, 2008 11:43 AM

Answers

  • User-125547262 posted

    My question is in an asp.net application where I will be using vb.net where do I put this code in the aspx file or the aspx.vb file?
    --Its your call .General preference would be to have it in the .vb file

    Also are the ADO classes or namespaces that I will need automatically imported in to my application or do I need to manually code this
    -- Depends.. some of them getting added when you create a project .Others you have to add the reference and import the name space in your file

    I'd suggest taking a look at some of the tutorials with sample code to clarify things

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 7, 2008 11:58 AM