Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP.NET Four Controls

ASP.NET Four Controls

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasequestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dpthomas
    wrote on last edited by
    #1

    I have an ASP.NET form with about 20 textboxes and several dropdown lists. Is there a way to send all of the information to my database handling routines - other than creating 30+ parameters?

    Doug Thomas

    J 1 Reply Last reply
    0
    • D dpthomas

      I have an ASP.NET form with about 20 textboxes and several dropdown lists. Is there a way to send all of the information to my database handling routines - other than creating 30+ parameters?

      Doug Thomas

      J Offline
      J Offline
      jitu gupta
      wrote on last edited by
      #2

      Hi , yur can use model class for that. create one class which contains all set and get property and then create object of that calss that object will contain all parameter and finally pass this object to the database . please let me know if u required more help i will send u code . :) "It is not enough to have a good mind. The thing is to use it well." Thanks Jitendra

      D 1 Reply Last reply
      0
      • J jitu gupta

        Hi , yur can use model class for that. create one class which contains all set and get property and then create object of that calss that object will contain all parameter and finally pass this object to the database . please let me know if u required more help i will send u code . :) "It is not enough to have a good mind. The thing is to use it well." Thanks Jitendra

        D Offline
        D Offline
        dpthomas
        wrote on last edited by
        #3

        Thanks - code would be helpful. I come from a Visual FoxPro background and some of this is slow going... Thanks again

        Doug Thomas

        J 1 Reply Last reply
        0
        • D dpthomas

          Thanks - code would be helpful. I come from a Visual FoxPro background and some of this is slow going... Thanks again

          Doug Thomas

          J Offline
          J Offline
          jitu gupta
          wrote on last edited by
          #4

          hi, in your model class two property is defined like this private int caseId; private string dbnumber; public int CaseId { get{return caseId;} set{caseId=value;} } public string DBNumber { get{return dbnumber;} set{dbnumber=value;} } this is your two property in model class and u can access this two property by using model class object like this Model.Case objModelCase = new Model.Case(); case is the model class and objModelCase is the object of case class objModelCase.DBNumber=txtDrNumber.Text; objModelCase.CaseId=txtCase.Text; and finally u can paas this objModelCase object to database. i think this will solve your problem. "It is not enough to have a good mind. The thing is to use it well." jitendra

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups