|
Console.WriteLine(Session["mysession"]); ??
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Normaly This woud be ok, but I wan't to retrive session from class, that the class isn't inherited from anything.
So I Can't access Session class
|
|
|
|
|
Where did you put this class? in Web Project or somewhere??
I have tried with the following code. it works..
In Default.aspx
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
Session["mysession"] = "d";<br />
<br />
}<br />
protected void Button2_Click(object sender, EventArgs e)<br />
{<br />
Class1 obj = new Class1();<br />
Response.Write( obj.getValueFromSession("mysession"));<br />
}
In Class1.cs
<br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
<br />
public class Class1<br />
{<br />
public Class1()<br />
{<br />
}<br />
public string getValueFromSession(string key)<br />
{<br />
return HttpContext.Current.Session[key].ToString();<br />
}<br />
<br />
}<br />
it works fine.. Please try againn.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Gonna try when i get home in about 6 hours
|
|
|
|
|
|
HttpContext.Current.Session
We Can Do Anything, If We Want It
|
|
|
|
|
Within the context of web application,
HttpContext.Current.Session["name"]
|
|
|
|
|
Already tried that.
Didn't help.
I can't remeber the error, because currently i am not home.
|
|
|
|
|
If it is a compilation error, then try using
System.Web.HttpContext.Current.Session["Name"]
The assembly should have a reference to System.Web .
|
|
|
|
|
Thanks, This one helps.
I had compilation error saying my Session doesn't belong to HttpContext
|
|
|
|
|
Hi,
I have a page1.aspx , there i have a link button on click of which i opens a pop up window.
My requirement is that when my pop up window is opened then the user should not be able to perform any action on the page1.aspx
I used a modular window for this, but again i have a linkbutton on that modular window, clicking on it opens a new url in new window.But i want it to be in same modular window.
So any of the thing can resolve my problem
1> A pop up window where user cannot perform any action on page1.aspx
2> A modular window, having link button , clicking on it should open the new page in it self
Is there any way to make the Page1.aspx disabled (fade color with)when pop up window is active.
thanx
|
|
|
|
|
sandeep kumar pundhir wrote: A pop up window where user cannot perform any action on page1.aspx
Use window.showModalDialog instead of window.open .
sandeep kumar pundhir wrote: A modular window, having link button , clicking on it should open the new page in it self
use HTML "a" link instead of link button..
hope it helps....
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
I have a modestly complex custom page within a repeater which receives one record at a time from another (gridview) page for update of a sql table row.
Among the controls on this page are cascading dropdown lists, each dependent on the previous selection. Population of succeeding lists is accomplished via a SelectedIndexChanged Sub. This must of necessity refer to the previous control by name as in Alpha.SelectedItem.Text. Since Alpha is within the repeater, it must be qualified. I've tried every combination I can think of but nothing identifies Alpha.
The master page is Master, the container is Container1, the repeater is Repeater1, and the dropdownlist is Alpha. How do I do this (in VBScript)?
Thanks
|
|
|
|
|
Hi,
I am developing an ASP.NET E-Learning application which should show videos online to the registered users. I am able to show this by adding a media player plugin in the ASP.NET page. I would like to know whether this is the right way to for it.
I am getting this thought because, I see all online application which provide videos use streaming videos.
So do I need to create streaming components for best result?
Thanks
Sreejith.
Sree
|
|
|
|
|
You can embed the Video using OBJECT tag right?
|
|
|
|
|
Can I register the events of dropdownlist in a gridview in ItemDatabound
If yes how, If no why...
Basically I have a grid and it contains one dropdownlist and two date controls
On change of the dropdownlist i want to point an event which will change the dates and extra which i have made. So i want a possible way to get the events of the dropdowns and point to the event which is a linkbutton click event.
Bye
|
|
|
|
|
state information is invalid or web page is corrupted.
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
It means that either the state information is invalid or the web page is corrupted.
If you give some more information about where and when you get the error message, and what it is that you are trying to do, then perhaps someone can give you something more specific about it.
---
single minded; short sighted; long gone;
|
|
|
|
|
|
hi
During setup and deployement
selecting Project Output to open the Add Project Output Group dialog box.
In add project output group dailog box , project and configuration combobox are not having any items to select.
how to solve this, and how to deploye a web application.
thanks
|
|
|
|
|
|
i cant run my program, there's an error:
Type 'BOOK_Locator.Dataset1' is not declared
in codes:
Friend WithEvents DataSet11 As BOOK_LOCATOR.DataSet1
i have connected my database in connection wizard properly but why there's an error in it? how can i fix?
|
|
|
|
|
|
no, its not follow-up i already connect my database using connection wizard...but when i write my codes, the program is not running bec. of the error,it says that the dataset11 is not defined... whats the meaning of that????
|
|
|
|
|
Rharzkie wrote: no, its not follow-up i already connect my database using connection wizard...
In other words, it's a follow-up.
A good place for a follow-up is in the same thread.
Rharzkie wrote: but when i write my codes, the program is not running bec. of the error,it says that the dataset11 is not defined... whats the meaning of that????
That's not the same error that you quoted in your previous post. What is the error message exactly?
If the compiler says that something is not defined, then it's because it's not defined. Why do you think that it should be defined? Have you defined it? If so, where?
---
single minded; short sighted; long gone;
|
|
|
|