Buy Questpond's video subscriptions on
huge discount
.
Online: 7723
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
ASP.NET
>
Loading ...
Retain session values to html pages [Resolved]
Posted by
jayanthichebrolupanoramicworldbiz-8895
under
ASP.NET
on 2/10/2011 |
Points: 10
| Views : 4005 | Status :
[Member]
| Replies : 13
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
Hi,
Is there any way to get session values from an aspx page to html page.Actual page is aspx page only but redirecting to html page when i use sessions in that page giving object reference error
[Resolved]
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
jayanthichebrolupanoramicworldbiz-8895
on: 2/11/2011
[Member]
Starter
|
Points: 25
0
Thanks for all your replies.I achieved this through cookies.Now it is working.
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Madhu.b.rokkam
on: 2/10/2011
[Member]
[MVP]
Bronze
|
Points: 25
0
Hi,
Yes, you can pass those sessions values thru querystring to html page, Make sure the details are not confidential data as in querystring its visible to the outer world.
Regards
Madhu
Thanks and Regards
Madhu
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Karthikanbarasan
on: 2/10/2011
[Member]
[Moderator]
[Microsoft_MVP]
[MVP]
Silver
|
Points: 25
0
Hi Madhu,
Can u post an example... Once we pass the values as query string to how to retrive in html page?
Thanks
Karthik
www.f5Debug.net
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
jayanthichebrolupanoramicworldbiz-8895
on: 2/10/2011
[Member]
Starter
|
Points: 25
0
Yes my another requirement is to retrieve again from html page
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Karthikanbarasan
on: 2/10/2011
[Member]
[Moderator]
[Microsoft_MVP]
[MVP]
Silver
|
Points: 25
0
Yes, there shld be some option to get that... lets wait for madhu's reply...
Thanks
Karthik
www.f5Debug.net
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Madhu.b.rokkam
on: 2/10/2011
[Member]
[MVP]
Bronze
|
Points: 25
0
Hi,
In javascript we have something called window.location.search.substring(1) to access the passed querystring parameters
try this sample as below I have coded with html only ... aply the same logic for other cases also.
<html>
<script language="javascript>
var str=window.location.search.substring(1);
alert(str);
</script>
<body>
<form action="test.html">
<input type="text" name="myParam1" />
<input type="submit" />
</form>
</body>
</html>
Save this as test.html and execute to see the result.
Regards
Madhu
Thanks and Regards
Madhu
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Naimishforu
on: 2/10/2011
[Member]
[MVP]
Bronze
|
Points: 25
0
Hi,
You may use ViewState I think!!
Thanks
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
jayanthichebrolupanoramicworldbiz-8895
on: 2/10/2011
[Member]
Starter
|
Points: 25
0
How can we pass values from one page to another using viewstate
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Naimishforu
on: 2/10/2011
[Member]
[MVP]
Bronze
|
Points: 25
0
u just use/Set the "previouspage" property in the which page u wanted .
example (form 1 u have the "testbox1"
u want to access the value of textbox1 from default1.aspx"
so now u u open default2.aspx
in the code behind just set the following code
page obj=this.previouspage;
testbox txtobj=obj.findcontrol("textbox1");// here u get the data from page1 to page2
string str=txtobj.text;
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Karthikanbarasan
on: 2/10/2011
[Member]
[Moderator]
[Microsoft_MVP]
[MVP]
Silver
|
Points: 25
0
Between aspx pages its fine... but we need to have it from ASPX to HTML
Thanks
Karthik
www.f5Debug.net
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
jayanthichebrolupanoramicworldbiz-8895
on: 2/10/2011
[Member]
Starter
|
Points: 25
0
My controls(suppose username& password) are in master pages that too different master pages i can able to allow them to login from any page and once he logged in displaying his specific options on the top across the pages this i achieved through session except the case when html pages in the application. If i use cookies its working but i need to change all the pages or any other alternate is there
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Madhu.b.rokkam
on: 2/10/2011
[Member]
[MVP]
Bronze
|
Points: 25
0
What you can do is to have one single master html page, define framesets and load all your other html pages in that, that way you dont have to change in all the html pages anymore.
regards
Madhu
Thanks and Regards
Madhu
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Karthikanbarasan
on: 2/11/2011
[Member]
[Moderator]
[Microsoft_MVP]
[MVP]
Silver
|
Points: 25
0
Good one!!! If your data is not sensitive then cookie would be a good option!!!
Thanks
Karthik
www.f5Debug.net
jayanthichebrolupanoramicworldbiz-8895
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...