Click here to Skip to main content
15,896,402 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: loop only affecting last row Pin
eyeseetee11-Jul-08 1:21
eyeseetee11-Jul-08 1:21 
Questionreceive error Pin
nithydurai10-Jul-08 23:14
nithydurai10-Jul-08 23:14 
AnswerRe: receive error Pin
Sam Xavier11-Jul-08 0:39
Sam Xavier11-Jul-08 0:39 
QuestionDynamically administrate ASP.NET Pin
xax10-Jul-08 22:57
xax10-Jul-08 22:57 
QuestionLike gmail how to add and send multiple attachment files?, Pin
Member 387988110-Jul-08 22:54
Member 387988110-Jul-08 22:54 
AnswerRe: Like gmail how to add and send multiple attachment files?, Pin
Sam Xavier11-Jul-08 0:58
Sam Xavier11-Jul-08 0:58 
QuestionHttpContext.Current.Session is getting null Pin
ash0410-Jul-08 22:05
ash0410-Jul-08 22:05 
AnswerRe: HttpContext.Current.Session is getting null Pin
N a v a n e e t h10-Jul-08 22:13
N a v a n e e t h10-Jul-08 22:13 
ash04 wrote:
and when i am checking HttpContext.Current.Session, it is showing that it is null. I cant understand why it is null.


Because you base page has stopped calling "OnInit" on it's base page which is "System.Web.UI.Page". So always override it
public class DD_AdmBasePage : System.Web.UI.Page
{
     public string LoginUser;
     
     public DD_AdmBasePage()
     {
         LoginCheck();
     }

     protected void LoginCheck()
     {
         if (HttpContext.Current.Session["LoginUser"]!=null)
             LoginUser= HttpContext.Current.Session["LoginUser"].ToString();
         else
             HttpContext.Current.Response.Redirect("~/login.aspx");
     }

     protected override void OnInit(EventArgs e) {
          base.OnInit(e);
     }
}


All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: HttpContext.Current.Session is getting null Pin
ash0410-Jul-08 22:28
ash0410-Jul-08 22:28 
GeneralRe: HttpContext.Current.Session is getting null Pin
N a v a n e e t h10-Jul-08 22:42
N a v a n e e t h10-Jul-08 22:42 
GeneralRe: HttpContext.Current.Session is getting null Pin
ash0410-Jul-08 22:55
ash0410-Jul-08 22:55 
GeneralRe: HttpContext.Current.Session is getting null Pin
Sandeep Akhare11-Jul-08 0:02
Sandeep Akhare11-Jul-08 0:02 
GeneralRe: HttpContext.Current.Session is getting null Pin
ash0411-Jul-08 1:03
ash0411-Jul-08 1:03 
GeneralRe: HttpContext.Current.Session is getting null Pin
Sandeep Akhare11-Jul-08 1:19
Sandeep Akhare11-Jul-08 1:19 
QuestionJavascript error Pin
Agweet10-Jul-08 21:58
Agweet10-Jul-08 21:58 
AnswerRe: Javascript error Pin
ash0410-Jul-08 22:44
ash0410-Jul-08 22:44 
GeneralRe: Javascript error Pin
Agweet10-Jul-08 22:49
Agweet10-Jul-08 22:49 
GeneralRe: Javascript error Pin
ash0410-Jul-08 23:01
ash0410-Jul-08 23:01 
AnswerRe: Javascript error Pin
shames(Sam)11-Jul-08 2:20
shames(Sam)11-Jul-08 2:20 
QuestionDisplaying database values in a dropdownlist Pin
eyeseetee10-Jul-08 21:56
eyeseetee10-Jul-08 21:56 
AnswerRe: Displaying database values in a dropdownlist Pin
eyeseetee10-Jul-08 22:56
eyeseetee10-Jul-08 22:56 
QuestionPlaying a please wait flash!!! Pin
WebMaster10-Jul-08 21:31
WebMaster10-Jul-08 21:31 
AnswerRe: Playing a please wait flash!!! Pin
Sherin Iranimose10-Jul-08 21:49
Sherin Iranimose10-Jul-08 21:49 
AnswerRe: Playing a please wait flash!!! Pin
Sandeep Akhare10-Jul-08 21:52
Sandeep Akhare10-Jul-08 21:52 
GeneralRe: Playing a please wait flash!!! Pin
Ha ha ha ha ha ha ha ha12-Jul-08 0:26
Ha ha ha ha ha ha ha ha12-Jul-08 0:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.