473,765 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Masked Edit Control

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="JavaS cript">
function LoadControls()
{
alert(document. forms[0].mskOffice);
document.forms[0].mskOffice.Text = "510-739-1499";
}
</script>
</HEAD>
<body MS_POSITIONING= "GridLayout " onLoad="LoadCon trols();">
<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">En ter Phone:</asp:label>
<OBJECT id="mskOffice" style="Z-INDEX: 104; LEFT: 340px; WIDTH: 153px;
POSITION: absolute; TOP: 82px; HEIGHT: 26px" codeBase="msmas k32.ocx"
classid="clsid: C932BA85-4374-101B-A56C-00AA003668DC" name="mskOffice "
VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="4048">
<PARAM NAME="_ExtentY" VALUE="688">
<PARAM NAME="_Version" VALUE="393216">
<PARAM NAME="BorderSty le" VALUE="1">
<PARAM NAME="ClipMode" VALUE="0">
<PARAM NAME="MousePoin ter" VALUE="0">
<PARAM NAME="Appearanc e" VALUE="1">
<PARAM NAME="BackColor " VALUE="-2147483643">
<PARAM NAME="ForeColor " VALUE="-2147483640">
<PARAM NAME="PromptInc lude" VALUE="-1">
<PARAM NAME="AllowProm pt" VALUE="0">
<PARAM NAME="AutoTab" VALUE="0">
<PARAM NAME="HideSelec tion" VALUE="-1">
<PARAM NAME="Enabled" VALUE="-1">
<PARAM NAME="MaxLength " VALUE="64">
<PARAM NAME="OLEDragMo de" VALUE="0">
<PARAM NAME="OLEDropMo de" VALUE="0">
<PARAM NAME="PromptCha r" VALUE="_">
<PARAM NAME="Mask" VALUE="###-###-####">
</OBJECT>
</form>
</body>
</HTML>

=============== =============== ===========

alerting "document.f orms[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.
Nov 19 '05 #1
1 5511
That's not a web control, therefore it's not very suitable for use on a web
page.
That's meant more for a windows forms application.

Here are some free masked edit web controls that will probably work out
better for you:
http://www.assistedsolutions.com/com...InputMask.aspx
http://www.eworldui.net/CustomContro...edTextBox.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"metridevkk " <me********@dis cussions.micros oft.com> wrote in message
news:1A******** *************** ***********@mic rosoft.com...
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="JavaS cript">
function LoadControls()
{
alert(document. forms[0].mskOffice);
document.forms[0].mskOffice.Text = "510-739-1499";
}
</script>
</HEAD>
<body MS_POSITIONING= "GridLayout " onLoad="LoadCon trols();">
<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">En ter Phone:</asp:label>
<OBJECT id="mskOffice" style="Z-INDEX: 104; LEFT: 340px; WIDTH: 153px;
POSITION: absolute; TOP: 82px; HEIGHT: 26px" codeBase="msmas k32.ocx"
classid="clsid: C932BA85-4374-101B-A56C-00AA003668DC" name="mskOffice "
VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="4048">
<PARAM NAME="_ExtentY" VALUE="688">
<PARAM NAME="_Version" VALUE="393216">
<PARAM NAME="BorderSty le" VALUE="1">
<PARAM NAME="ClipMode" VALUE="0">
<PARAM NAME="MousePoin ter" VALUE="0">
<PARAM NAME="Appearanc e" VALUE="1">
<PARAM NAME="BackColor " VALUE="-2147483643">
<PARAM NAME="ForeColor " VALUE="-2147483640">
<PARAM NAME="PromptInc lude" VALUE="-1">
<PARAM NAME="AllowProm pt" VALUE="0">
<PARAM NAME="AutoTab" VALUE="0">
<PARAM NAME="HideSelec tion" VALUE="-1">
<PARAM NAME="Enabled" VALUE="-1">
<PARAM NAME="MaxLength " VALUE="64">
<PARAM NAME="OLEDragMo de" VALUE="0">
<PARAM NAME="OLEDropMo de" VALUE="0">
<PARAM NAME="PromptCha r" VALUE="_">
<PARAM NAME="Mask" VALUE="###-###-####">
</OBJECT>
</form>
</body>
</HTML>

=============== =============== ===========

alerting "document.f orms[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.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2107
by: david | last post by:
Anybody could give me hint how use this control in asp.net web form. The problem is: I try to use COM component in my web form app by using MS training kit for windows form application. I would like to do the similar thing. The guide asks me to add Masked Edit Control to the Toolbox by adding Microsoft Masked Edit Control and I did it. However, there is no Mask property of this edit control box. Another is how declare this control.
1
1948
by: larry | last post by:
hi, using the masked edit control in vb.net, I have a control named mskbanknum when i set mskbanknum.text = "125" the value "125" is not displayed in the vb.net form the debugger verify's that the value of mskbanknum.text actually is "125"
1
3478
by: Kostis | last post by:
Hello there! I have created a windows application in VB.NET and I want to retrieve data from an access database. I create the OleDbConnection, an OleDbAdapter, a dataset and finally a Data Form using the Data Form Wizard. Everything works fine. The problem is that I want to use the masked edit control to manage the way some fields appear, and are being stored to the database. I insert the "Microsoft Masked Edit Control, version 6.0" (Path...
3
2611
by: Panos | last post by:
Hi all, I can't clear a Masked edit control. I use it to input dates, so I have defined the mask as "##/##/####". I use the the well known meb.mask="" meb.text="" , but nothing happens. Does anybody have a clue, why these lines don' t work? I use vb.net 2002 Thank u
0
1034
by: jin | last post by:
Hi, i sa wthe textbook said, # is a digit place holder which entry required while 9 is a digit place holder which entry optional actually what is the meaning of entry optional and entry required, in masked edit control, mask properties? i try on code but can't see the differences??
7
8699
by: DazedAndConfused | last post by:
Curently I manualy code keypress edits. i.e. allow only 3 digits before decimal and two digits after decimal in .NET. Is there an easy solution to mask text boxes? The MSMASK32.OCX from vb6 does not seem to be appropriate for a desktop application with textboxes not bound to a dataset, am I wrong? -- How time fly's when you don't know what you are doing!
0
1027
by: jean-michel bain-cornu | last post by:
Hi all, I'm trying to get the whole field selected when the caret arrives into a wx masked control. This is perfectly done with the program below. But if I comment out the line "r= dlg.ShowModal()", I get something different : the data within the field is no more correctly selected. Why ? And is there any solution ? If somebody have got an idea, I'd be delighted.
3
9138
by: dmbuso | last post by:
I have a money field defined in a SQL Server 05 database with a value of 49.50. Also, it displays in SQL Server as 49.5000. I have a form in VB.NET 2005 and I'm using the new MaskedTextBox control in Visual Studio. I set the Mask property for the text box to "$999.00". The problem is when I run the form the text box displays "$495.00" and not "$49.50" as one would expect. It it shifting the values left here. How do I fix this? Thanks...
4
3174
by: mwcapps | last post by:
I have unformatted text in my SQL 2005 database. I'm pulling it into a masked edit text box with a (999)999-9999 mask. Unfortunately, when I attempt to save the data back it doesn't work because I don't know how to get the 'masked' information back to the 'unmasked' raw data that the database wants.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.