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" <zebs@.gmail.com> wrote in message
news:1176896179.712158.178770@.o5g2000hsb.googlegroups.com...
> 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!!!
>

0 comments:

Post a Comment