Re: Masked Edit Control

From: Leon Friesema (leon_at_@frostbits.nl)
Date: 12/03/04

  • Next message: Sergey Gorbachev: "ViewState in database"
    Date: Fri, 03 Dec 2004 09:45:40 +0100
    
    

    On Thu, 2 Dec 2004 22:21:12 -0800, "metridevkk"
    <metridevkk@discussions.microsoft.com> wrote:

    >Bcoz I want the "-" character to appear in the phonenumber. When the user
    >keys in phone number, he need not type the "-" in between, the appears
    >automatically.
    >
    >"Leon Friesema" wrote:
    >
    >> On Thu, 2 Dec 2004 21:29:07 -0800, "metridevkk"
    >> <metridevkk@discussions.microsoft.com> wrote:
    >>
    >> >Hi,
    >> >I need to use a Masked Edit Control in my ASPX page. In VS.Net, I added the
    >> >reference to MSMask.dll for my application & also added the MaskEdBox to the
    >> >Toolbox.
    >> >
    >> >After adding the control to the web form, when I select the control & see
    >> >its properties, I do not see the "Text" property. I also try to set the
    >> >"Text" property in a javascript function, but cannot access it.
    >> >
    >> >Here is the code:
    >> >=================================================
    >> ><HTML>
    >> ><HEAD>
    >> ><title>WebForm1</title>
    >> ><script language="JavaScript">
    >> >function LoadControls()
    >> >{
    >> >alert(document.forms[0].mskOffice);
    >> >document.forms[0].mskOffice.Text = "111-111-1111";
    >> >}
    >> ></script>
    >> ></HEAD>
    >> > <body MS_POSITIONING="GridLayout" onLoad="LoadControls();">
    >> ><form NAME="form1" id="Form1" method="post" runat="server">
    >> ><asp:label id="Label1" style="Z-INDEX: 101; LEFT: 252px; POSITION:
    >> >absolute; TOP: 83px" runat="server" Width="83px">Enter Phone:</asp:label>
    [SNIP OBJECT]
    >> ></form>
    >> ></body>
    >> ></HTML>
    >> >
    >> >=========================================
    >> >
    >> >alerting "document.forms[0].mskOffice" returns [Object], however the Text
    >> >property is not set.
    >> >
    >> >I am a newbie in ASP.NET and ActiveX Controls, so any help will be greatly
    >> >appreciated!!!!
    >> >
    >> >Thanks.
    >>
    >> Just a suggestion, but why don't you use a Validator?
    >>
    >> Leon.
    >>

    I understand that, but it's not really recommended to use ActiveX
    Controls. Besides that, why would you even bother to access it from
    JavaScript, can't you acces the Text-value through the code-behind?
    TBH I've never used ActiveX controls in .NET Projects.. so not much
    help there...

    Leon.


  • Next message: Sergey Gorbachev: "ViewState in database"

    Relevant Pages

    • Re: program to store passwords
      ... At 03:58 PM 6/27/2005, Leon wrote: ... >Could anyone supply a suggestion on what they like and ... I use to use p-safe back in the day just ... Michael Cecil ...
      (Security-Basics)
    • Re: Dirty Injectors
      ... How about Lanny's suggestion to me about cleaning the grounds? ... Leon ... Prev by Date: ...
      (rec.autos.makers.mazda.miata)
    • Re: program to store passwords
      ... ninjas 0wn the night! ... > From: Leon ... > Could anyone supply a suggestion on what they like and ...
      (Security-Basics)