Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hello All Frds,


i want to put a welcome to my website message with image when any user visit my website frist time in asp dot net.

please tell me code for to put in default page ...



Thanks to all in Advance....
Posted
Updated 13-Apr-12 5:53am
v2
Comments
ZurdoDev 13-Apr-12 11:22am    
I don't know that anyone will give you all the code you want. What have you done so far? Are you checking for a cookie to see if they have visited before?
Sergey Alexandrovich Kryukov 13-Apr-12 11:54am    
I'm sure you understand the limitations of it. Anyway, I credited your advice in my answer, please see.
--SA

Hi,
The easiest way is to create a Session object when a user signed up for the first time and when page is redirected to the Default page, that session is evaluated and show or hide a control(which your welcome message is on) based on its value.

I hope it helps
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Apr-12 11:56am    
If the user signs up, there are no a problem anyway, because all users are uniquely identified anyway. OP might mean it: visit. I basically answered, please see.
--SA
Yatin_Chauhan 14-Apr-12 2:32am    
can i set the coockie for that and check that the user are visited that page or not..
It depends on what do you mean: first visit or first sign up.

With sign-up, it is trivial, but the "first visit" is something which cannot be strictly detected. If the same individual removed all cookies or even use different IP — is it the same user or not? If a different individual uses the same computer with the same cookies, is at a different person or not? — The server side cannot tell that…

For identification of a user as a person who signs up, you can use just the unique username to identify the user.

If you want to deal with just the visit, take into account my notes above. You can use cookie as ryanb31 advised. You can also check up client IP address which you receive in the HTTP request. You should understand that the IP could be dynamic (and most typically is) and might change from time to time, and the cookies can be removed or disabled. Basically, if a user visit the page from another computer, you don't have a chance to identify this person as the same one (it would be a miracle if one could :-)), but with authentication, there are no such problems at all.

—SA
 
Share this answer
 
v3
Comments
[no name] 13-Apr-12 15:35pm    
Thanks For answering it Sir..I was also finding it
Sergey Alexandrovich Kryukov 13-Apr-12 17:45pm    
You are welcome.
If you agree that it's reasonable, please accept the answer formally (green button) -- thanks.
--SA
Espen Harlinn 13-Apr-12 18:05pm    
A nice reply as usual :-D
Sergey Alexandrovich Kryukov 13-Apr-12 18:14pm    
Thank you, Espen.
--SA
Espen Harlinn 13-Apr-12 18:15pm    
Getting late, as usual - so I guess it's time to call it a day :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900