locked
code change are reflecting in dev environment but not able see those changes on test site after deployment RRS feed

  • Question

  • In Vb.net , we have written code for focusing control on textbox. The focusing is reflecting in dev environment but the changes are not reflecting in test site after deployment. we have cleared the cache and also we have placed log before and after textbox.focus to check whether dll deployed is correct or not. The logs are working fine but focus is not working on test site. Please provide some suggestions to make it work on test site.

    The code we have written is:

    Public Sub Setup(ByVal userId As String)
    
                pnlResetPassword.Visible = True
                txtPassword1.Focus()
                pnlResult.Visible = False
    
          	    _userId = userId
        	    txtPassword1.Text = ""
                txtPassword2.Text = ""
    
        End Sub


    

    Wednesday, December 26, 2018 1:25 PM

All replies

  • Hello,

    What do you mean by test site, a customer's network, customer's local machine, what type of machine?

    Is the environment different between dev and prod e.g. window versions ?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, December 26, 2018 1:45 PM
  • Are you using an UpdatePanel? In case of ASP, the focus can be also set using a simple JavaScript code: https://forums.asp.net/t/1962120.aspx. (Visit that dedicated forums too).

    Wednesday, December 26, 2018 1:49 PM
  • Hi

    Depending on how you have layed out the controls - for example is txtpassword inside a Panel?

    Anyway, using txtpassword.Focus(), I could re-create the effect you see. Using instead, txtpassword.Select() solved the issue here.


    Regards Les, Livingston, Scotland

    Wednesday, December 26, 2018 1:56 PM
  • There is no Select() method in vb.net. Please provide some other suggestions.
    Thursday, December 27, 2018 7:16 AM
  • After devlopment , we deploy changes on test server. If all changes are working fine then we move to staging server.

    And then from staging to Production(Live) server.

    Thursday, December 27, 2018 7:21 AM
  • No, I am not using any update panel.
    Thursday, December 27, 2018 7:21 AM
  • Can you try moving the Focus line to the last line.

    Public Sub Setup(ByVal userId As String)
    
        pnlResetPassword.Visible = True
        pnlResult.Visible = False
    
        _userId = userId
        txtPassword1.Text = ""
        txtPassword2.Text = ""
    
        txtPassword1.Focus()
    End Sub


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Thursday, December 27, 2018 10:28 AM