Click here to Skip to main content
11,932,103 members (63,251 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
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 13-Apr-12 5:57am
Edited 13-Apr-12 6:53am
ryanb31 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?
SAKryukov 13-Apr-12 11:54am
I'm sure you understand the limitations of it. Anyway, I credited your advice in my answer, please see.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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
SAKryukov 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.
Chauhan_Yatin 14-Apr-12 2:32am
can i set the coockie for that and check that the user are visited that page or not..
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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 Smile | :) ), but with authentication, there are no such problems at all.

onurag19 13-Apr-12 15:35pm
Thanks For answering it Sir..I was also finding it
SAKryukov 13-Apr-12 17:45pm
You are welcome.
If you agree that it's reasonable, please accept the answer formally (green button) -- thanks.
Espen Harlinn 13-Apr-12 18:05pm
A nice reply as usual :-D
SAKryukov 13-Apr-12 18:14pm
Thank you, Espen.
Espen Harlinn 13-Apr-12 18:15pm
Getting late, as usual - so I guess it's time to call it a day :-D
SAKryukov 13-Apr-12 18:25pm
Have a great weekend.
Chauhan_Yatin 14-Apr-12 1:41am
i just want to simple to do that when any user open my website frist time the fancebox popup that welcome to my website. and i have done that.. but when it again redirect to default page the fancebox popup again bcz i write the code in "body onload event so that".....can i check it using session??
SAKryukov 20-Apr-12 16:36pm
You certainly can, with some false positives (same user, but different browser, computer, etc...).

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 13 Apr 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100