Best way to call a class from code behind

P

Pushpadant

Hi,

I have a web apps wherein the registration.aspx has about 7 textbox
(general registration form with username, Fname, Lname, Password,
EmailAddress etc,

now i have to insert these values in the database after the user clicks
on submit.
OnSubmit : i have a user class
clsUser
{
private string Username;
private string Fname,Lname; //etc

public insert_user(string un,string Ln,....)
{
clsUser.Username = un;
......
objDataBase.insertuser(clsUser.Username.....)
}


In code behind i will create an object of clsUser and call the fuction
as

objclsUser.insert_user(textbox1.text, .......);

I dont feel this is the best method, can i use all the vars (username,
Lname....) as properties...in the class clsUser

in short how do i make both the classes lesser dependent on each
other.....

help appreciated....

thnx,
Pushpadant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top