User profiling in ASP.net .. if its called so!

Status
Not open for further replies.

deepakgates

Broken In
hey! geeks
This is my first post cause usually i get what i want simply by searching web.
but this time I don’t know what im searching for. So what could be a better place than thinkdigit forum.

So. i just want to know how to create a new user profile page using asp.net.
Like all those web sites where you register, and then website automatically creates a very personal customisable profile page. Like welcome user and all those stuff kinda orkut, facebook an all.

The point is I dont know what to call it. user profiling or user role management or adding new user.

im not new to asp.net. so please help me out. just tell me how its done regardless of difficulties.

im creating a web site i want to add user on em.

Hope you all get what im asking for. and im having a positive feeling with my very first post.

deepakgates
 

krishnandu.sarkar

Simply a DIGITian
Staff member
Well....The question is not too clear to me. But it seems that you want something like user profile.

Well first create a page for login, there will be a label : Username and beside it a textbox for entering username. Similarly create a password label and textbox. And a submit button. Arrange them using table.

Now validate the username and password though database or using static username and password as string in if/else.

Now once the user gets validated, redirect it to a new page saying Welcome <username>. ASP.NET is stateless. So you can't get the value of username textbox by simply using form.txtusername etc. For this you need cookies/sessions.

This is just a simple example. All this are done though database.

I hope it's clear to you now
 
OP
deepakgates

deepakgates

Broken In
thanks for your concern

okay cookie/session looks like new stuff to learn.

can you please explain the mechanism of whole process how its dun.

i mean to redirect users to its welcome page , the page has to be created beforehand.
is it??
and what if i want say 100 users then what i will have to create 100 welcome pages.
:oops::oops:

what i mean is how these sites like orkut works .. cause the pages and personal settings are created automatically as user registers for first time.
 

krishnandu.sarkar

Simply a DIGITian
Staff member
No dude, you just need to make one welcome page, and make it dynamic.

Say for eg, :

Welcome <Text1.text>

Now if I login as Krishnandu it'll show Welcome Krishnandu, and if I login as deepkgates it'll show Welcome deepakgates.

Once the user is authenticated redirect the user to that page.
I forgot the redirect syntax in ASP.NET, but it's something like response.redirect("URL");

Say this is your login.aspx coding
if txtusername="username" then
if txtpass="password" then
response.redirect("welcome.aspx");
endif
endif

well....i forgot vb syntax, correct it according to your need. and sorry if i've done mistake in syntax

Now after the user is authenticated he/she'll be redirected to welcome page.

Now set up a session/cookie there in login page and use it to retrive the username in welcome.aspx.

a simple form would be

Welcome <text1.text>

Now whatever you enter in text1.text it'll appear after Welcome.

But for a a value in some other page you need state management. ASP.NET cant get values simply by using formname.controlname.value

eg. login.aspx.text1.text This is not supported, as ASP.NET is stateless
 
Last edited:
OP
deepakgates

deepakgates

Broken In
thanks a lot. you just cleared lots of misconceptions regarding this stuff.

but still more to ask.
how to manage each user settings like their own personalized background their profile music, picture, and very thing else

does this require other technologies like Ajax and j script
 

Rollercoaster

-The BlacKCoaT Operative-
i think it would be much better if you pick up a book as your questions are about very broad and fundamental things. I personally like Wrox and Apress. see this one

btw what you want is generically a 'portal' which is a site where users login and see pages that are modified to personalized for each user. (think of it is a template filled for each user and server to them)

You should also be aware that .net applications need a windows platform which is generally costlier then LAMP servers. There are also a bunch of generic Portal sites available for free. check them out.
 
OP
deepakgates

deepakgates

Broken In
thanks roller coaster
i will look into it

---------- Post added at 04:34 AM ---------- Previous post was at 04:31 AM ----------

anyways are you telling me too ditch asp.net and learn an open source technology...
 

a2mn2002

keen to learn..
hye buddy .

Make user controls to add a new user. and then to customize the look of the particular user u hv to use the profile concept. u can use themes also.
 

Rollercoaster

-The BlacKCoaT Operative-
anyways are you telling me too ditch asp.net and learn an open source technology...

It depends on what you are learning the technology for. If you just want to make your own site then most people chose open source as it is cheaper and usually a big helping community is there.

but if you are interested in the technology because you like something about it then dude no doubt there :) (i learned .net because I liked the technology and then I made a career out of it)

PS: remember .net is also some what open with the express editions. only that the hosting it requires is a bit more costly.
 
OP
deepakgates

deepakgates

Broken In
hye buddy .

Make user controls to add a new user. and then to customize the look of the particular user u hv to use the profile concept. u can use themes also.

I HAVE ALREADY USED THAT CONTROL AND THATS BULLSHIT.
i don't understand the working underneath it. so i prefer making my own stuff.

thanks anyway!!

---------- Post added at 09:06 AM ---------- Previous post was at 09:03 AM ----------

well thanks everybody!!
so result i will have to read more books..


i was thinking if i can get the source code for this.
it will help me understand better.
 

krishnandu.sarkar

Simply a DIGITian
Staff member
Hey as u asked how to tackle with themes, images videos etc for per user. The answer is database

Well, let me say it briefly

Here is a database for you registered users

Registration ID, Name, Address, ProfileImage

Now u need to store the path of the image that the user uploads. Now when the same user login you'll get the path from RegistrationID / Name(whichever you create as primary key), and in that case you'll get the data of whole row including the path to image and then you can easily show the image.

For Videos, Albums and Themes query I would say consider this.

RegistationID, Name, AlbumID, VideoID, ThemeName

Now say you have two more tables.....Album and Video
AlbumID, ImageLink1, ImageLink2, ImageLink3.......so on...

VideoID, VideoLink1, VideoLink2, VideoLink3.......so on....

Now from your main table you'll get the AlbumID and VideoID for the user and then you can use sql to connect two tables using the AlbumID and VideoID.....so you'll get the videos and albums for that specific user.

Lemme say it with a eg.

RegistationID, Name, AlbumID, VideoID, ThemeName
01 xxx A1 V1 Country

AlbumID, ImageLink1, ImageLink2, ImageLink3
A1 a.jpg b.jpf c.jpg

VideoID, VideoLink1, VideoLink2, VideoLink3
V1 a.avi b.avi c.avi

Now when the user of RegistrationID 01 logins you'll get the whole row of data of where RegistrationID=01

Then connect the video table with VideoID and Album Table with AlbumID

the sql command will be like this

select video.albumlink1, video.albumlink2, video.albumlink3 where video.VideoID=Registration.VideoID

use the same for album table and you'll get the video and image links

And the theme you're easily getting from the registration table.

use this type of think
if Theme=="Country"
set country-theme

I hope you got it what i'm trying to say.
 
Status
Not open for further replies.
Top Bottom