Monday, March 26, 2012

setting session variable from javascript on a .html file

Hi!

I have an application in which a user searches for a particular item
as - He enteres the keyword in home.html and views the results in
searchresults.aspx.I want to uniquely identify the search based on the
timestamp+keyword. The keywork i can get from the URL. But is there
any way for me to get the timestamp for each unique search keyword
without modifying the URL ?

If i use if(IsPostBack) condition to set the timestamp, the timestamp
does not change even when I start a new search. I can't set a hidden
variable to detect if the page is fresh/not either ( by setting its
value from codebehind) , because the search can start from home.html
or searchresults.aspx. So how do can get the timestamp without
modifying the URL ??

Can I set a session variable from home.html, considering its not an
aspx page ?? Also, its the default starting page for the application.

Please help soon !

Thanks!!!Why would you need it in the URL?

When the searchresults page is run, it has a page_load. In here, you can
just get the time of the request and do whatever you want with it.

Maybe I am missing something...

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available

"Zeba" <coolzebs@.gmail.comwrote in message
news:1176896179.712158.178770@.o5g2000hsb.googlegro ups.com...

Quote:

Originally Posted by

Hi!
>
I have an application in which a user searches for a particular item
as - He enteres the keyword in home.html and views the results in
searchresults.aspx.I want to uniquely identify the search based on the
timestamp+keyword. The keywork i can get from the URL. But is there
any way for me to get the timestamp for each unique search keyword
without modifying the URL ?
>
If i use if(IsPostBack) condition to set the timestamp, the timestamp
does not change even when I start a new search. I can't set a hidden
variable to detect if the page is fresh/not either ( by setting its
value from codebehind) , because the search can start from home.html
or searchresults.aspx. So how do can get the timestamp without
modifying the URL ??
>
Can I set a session variable from home.html, considering its not an
aspx page ?? Also, its the default starting page for the application.
>
Please help soon !
>
Thanks!!!
>

1 comments:

mmolive4us said...

Good article.I really think what you said is right,in modern society,we have so many troubles,if you feel nothing to relax yourself,I suggest you to play the wow and some other games,and you can come to my page to find more information about WOW Gold and D3 Items

Post a Comment