Click here to Skip to main content
15,888,351 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Is it possible to to read the ftp file remote without downloading to the local drive Pin
Kennie_n200019-Feb-08 16:54
Kennie_n200019-Feb-08 16:54 
GeneralRe: Is it possible to to read the ftp file remote without downloading to the local drive Pin
Guffa19-Feb-08 20:39
Guffa19-Feb-08 20:39 
GeneralWeb messenger [modified] Pin
waheed awan19-Feb-08 12:22
waheed awan19-Feb-08 12:22 
GeneralXSL Dropdown problem [modified] Pin
waheed awan19-Feb-08 11:51
waheed awan19-Feb-08 11:51 
GeneralRe: XSL Dropdown problem Pin
Christian Graus19-Feb-08 12:38
protectorChristian Graus19-Feb-08 12:38 
QuestionIssue with viewstate? or something else? Pin
Neophyte3019-Feb-08 5:30
Neophyte3019-Feb-08 5:30 
AnswerRe: Issue with viewstate? or something else? Pin
Christian Graus19-Feb-08 12:40
protectorChristian Graus19-Feb-08 12:40 
GeneralRe: Issue with viewstate? or something else? Pin
Neophyte3019-Feb-08 23:03
Neophyte3019-Feb-08 23:03 
Yes - I set a breakpoint at the beginning of this event handler - I have removed the sql changes for clarity brevity Smile | :)

The issue I have is that the first time the event fires, the text displayed is changed (as expected). The second time the button is clicked, the event fires but the button text (which I am using in the switch) remains the same as the first click, triggering the same case again. I think the issue is something to do with the postback - the navigation tree collapses on postback.

My Page_Load event is:

protected void Page_Load(object sender, EventArgs e)
    {
        // on first load of page
        if (!IsPostBack)
        {
            if (User.Identity.Name != "")
            {
                if (Session["userName"] == null)
                    Session["userName"] = Requestor.user_name(User.Identity.Name, 3);
                if (Session["deptname"] == null)
                    Session["deptName"] = Requestor.dept_name(Session["userName"].ToString());

                // check user's department
                string deptname = Session["deptName"].ToString();

                if (!Requestor.Valid_User(User.Identity.Name))
                    Response.Redirect("dberror.htm");
                else
                {
                    // Calls a static method to populate the navigation treeview
                    Navigator.FillTreeMenu(NavTree, deptname);
                }
                // displays a personalised Welcome message
                lbl_User.Text = Requestor.user_name(User.Identity.Name, 1);
            }
            else
                Response.Redirect("usernameerror.aspx");
            // set up Queued data source
            SQLQueued.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
            SQLQueued.SelectCommand = "cp_Get_Queued_Info";
            // Refresh datagrid showing outstanding totals
            gvw_totals.DataBind();
        }
    }


In addition to the button misbehaviour, lbl_User.Text gets blanked. I think it has to be a viewstate/caching/compilation thing..?
AnswerRe: Issue with viewstate? or something else? Pin
Neophyte3020-Feb-08 5:40
Neophyte3020-Feb-08 5:40 
Generalspecify color in c# Pin
eyeseetee19-Feb-08 5:05
eyeseetee19-Feb-08 5:05 
GeneralRe: specify color in c# Pin
Guffa19-Feb-08 7:58
Guffa19-Feb-08 7:58 
Generali have access database [modified] Pin
ritu432119-Feb-08 2:28
ritu432119-Feb-08 2:28 
GeneralRe: i have access database Pin
That's Aragon19-Feb-08 2:39
That's Aragon19-Feb-08 2:39 
GeneralRe: i have access database Pin
Venkatesh Mookkan19-Feb-08 18:01
Venkatesh Mookkan19-Feb-08 18:01 
GeneralRuntime error handling problems. Pin
matjame19-Feb-08 2:05
matjame19-Feb-08 2:05 
GeneralA field or property with the name 'full_desc' was not found on the selected data source. Pin
Neophyte3019-Feb-08 2:03
Neophyte3019-Feb-08 2:03 
GeneralRe: A field or property with the name 'full_desc' was not found on the selected data source. Pin
J4amieC19-Feb-08 2:09
J4amieC19-Feb-08 2:09 
GeneralRe: A field or property with the name 'full_desc' was not found on the selected data source. [modified] Pin
Neophyte3019-Feb-08 2:12
Neophyte3019-Feb-08 2:12 
GeneralRe: A field or property with the name 'full_desc' was not found on the selected data source. Pin
Neophyte3019-Feb-08 4:28
Neophyte3019-Feb-08 4:28 
QuestionUsing membership and roleprovider, how to prevent being signed out and redirected to login.aspx when access denied? Pin
lizarb19-Feb-08 1:33
lizarb19-Feb-08 1:33 
GeneralHelp me Please Friends Pin
Zeeshan Ahmed Memon19-Feb-08 1:09
Zeeshan Ahmed Memon19-Feb-08 1:09 
GeneralRe: Help me Please Friends Pin
Christian Graus19-Feb-08 12:44
protectorChristian Graus19-Feb-08 12:44 
GeneralHelp me Please Pin
Zeeshan Ahmed Memon19-Feb-08 1:03
Zeeshan Ahmed Memon19-Feb-08 1:03 
GeneralRe: Help me Please Pin
dilipv20-Feb-08 0:58
dilipv20-Feb-08 0:58 
GeneralApplication's spped while postbak of a control Pin
Kissy1619-Feb-08 0:44
Kissy1619-Feb-08 0:44 

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.