locked
getting error: c# code RRS feed

  • Question

  • if (!IsPostBack)
            {
                Calendar1.Visible = false;
                Calendar2.Visible = false;
    
                 If (Convert.ToInt32(Session("level").ToString())<50 ))//error
            {
    
              AccessDenied.Visible = true;
    
               divRept.Visible = false;
    
            }
    
            else//error
            {
    
      AccessDenied.Visible = false;
    
      divRept.Visible = true;
          }


    thanks and regard love4csharp

    Tuesday, October 29, 2013 7:59 AM

Answers

  • Hi,

    Thanks for your posting.

    From your description ,  I think that this issue is related to ASP.net , ASP.NET forum is more suitable for it ,So I would like to suggest you to post directly in ASP.NET forum . Many professional  experts  are  in this area there  .It would be better if you can post a thread in ASP.NET  forums with providing some detailed information, such as:
    1.What’s the specific error ?
    2.What’s  the Session("level")?

    It’s better that you post your sample code or  package your program , Then upload the file  to https://skydrive.live.com and post back the link  in ASP.NET forum. 

    In addition , ASP.NET forum : http://forums.asp.net/

    Hope these help.


    Lilia Gong <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by love4csharp Monday, December 30, 2013 6:54 AM
    Friday, November 1, 2013 10:46 AM

All replies

  • Hi,

    Can you post the error you getting & the value you saving in the session variable "level". May be the session variable "level" is undefined when you execute this piece of code.

    Thanks

    Sammani

    http://sammanipalansuriya.blogspot.com/

    Tuesday, October 29, 2013 8:05 AM
  • Hi,

    Thanks for your posting.

    From your description ,  I think that this issue is related to ASP.net , ASP.NET forum is more suitable for it ,So I would like to suggest you to post directly in ASP.NET forum . Many professional  experts  are  in this area there  .It would be better if you can post a thread in ASP.NET  forums with providing some detailed information, such as:
    1.What’s the specific error ?
    2.What’s  the Session("level")?

    It’s better that you post your sample code or  package your program , Then upload the file  to https://skydrive.live.com and post back the link  in ASP.NET forum. 

    In addition , ASP.NET forum : http://forums.asp.net/

    Hope these help.


    Lilia Gong <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by love4csharp Monday, December 30, 2013 6:54 AM
    Friday, November 1, 2013 10:46 AM