Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TextBox TextMode="password" in Wizard step

Status
Not open for further replies.

Turkbear

Technical User
Joined
Mar 22, 2002
Messages
8,631
Location
US
Hi,
I must be missing something, I have several applications with aspx pages that use the
<asp:TextBox ID="txtPass" TextMode="password" />... control to get a user entered password and by reading the TEXT from that control (txtPass.Text) I can check the password for validity or pass it to another sub for processing..When I incorporate that process into a Wizard step, it seems to be unable to read that TEXT attribute.
Some sample code:
The Wizard:
Code:
<asp:Wizard
        id="Wizard1"
        HeaderText="Reports Gateway"
        OnFinishButtonClick="Wizard1_FinishButtonClick"
        CssClass="wizard"
        HeaderStyle-CssClass="header"
        SideBarStyle-CssClass="sideBar"
        StepStyle-CssClass="step"
        Runat="server">
        <WizardSteps>
        <asp:WizardStep ID="WizardStep1" Title="1: Directions">
        Welcome to the Gateway for MnDot's Enterprise Reports.    
        On the Following panels you will asked to enter
        Authentication Information and then choose a Report
        To Run.When you click the 'Finish' button you will be able to select 
        the needed parameter values for the selected report.
       
        </asp:WizardStep>
        <asp:WizardStep ID="WizardStep2" Title="2: Username,CMS and Password">
        <asp:Label
            id="lblUsr"
            Text="UserName:"
            AssociatedControlID="txtUSR"
            Runat="server" />
        <br />
        <asp:TextBox
            id="txtUSR"
            Runat="server" Value="Hold For Future Use" />
             <br /><br />
         <asp:Label
            id="lblEmpID"
            Text="CMS to Use - Dev by Default:"
            AssociatedControlID="txtCMS"
            Runat="server" />
        <br />
        <asp:TextBox
            id="txtCMS" 
            Runat="server" Value="oitw2ks516" />   
            <br /><br />
          <asp:Label
            id="lblPass"
            Text="Password:"
            AssociatedControlID="txtPassword"
            Runat="server" />
        <br />
        <asp:textbox 
    id="txtPassword" 
    textmode="Password"
    columns="25"
    maxlength="30"
    backcolor="LightYellow"
    font-name="Comic Sans MS"
    font-size="9pt"
    tooltip="Passwords are case-sensitve"
    runat=server 
/>
        </asp:WizardStep>

And the Process ( a snippet only) when the Finish button is clicked:
Code:
 sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As WizardNavigationEventArgs)
        Dim usr As String
        Dim pwd As String
        Dim aps As String
        usr = txtUSR.Text
        pwd = txtPassword.Text
        aps = txtCMS.Text
       lblTestResult.Text = "Here are the variable's contents: " & usr & " -pass= " & pwd & " - CMS server = " & aps

All the variables are populated except the pwd one - it is blank..Why, please? Is it possibly because that is not the last step in the wizard? ( there is one more before the Finish sub is called..)





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,
OK..I should test my ideas before posting..By making that the last step (StepType="Finish") it worked as expected...

Not sure why,though..maybe the viewstate??

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top