.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to Configure MaskedEditExtender & MaskedEditValidator

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :ASP.Net


I have a C#/ASP.NET web application that contains DetailsView controls that are used for CRUD operations through the EntityDataSource and Entity Framework. Unfortunately I'm not sure which forum would be best to post this under, since I am wondering whether either the MaskedEdit AJAX controls or Entity Data Model could be configured to allow for this.


The Entity Framework requires time fields to be of time(7) data type, which must be entered as 24-hour time, with seconds (e.g. '09:30:00'). However, I want the time entered in 12-hour time and without seconds (e.g. '9:30 AM'). Is there a way I can configure the MaskedEditExtender and/or MaskedEditValidator to allow for this. What I was thinking is possibly using the AutoComplete portion of this control to fill in the remaining portions (i.e. seconds) that the user does not enter, but which the EF requires. Either that or can the Entity Data Model or something else be configured to allow for this?

Existing Code

<asp:TemplateField HeaderText="Start Time" SortExpression="StartTime">

View Complete Post

More Related Resource Links

Default MaskedEditExtender and MaskedEditValidator CSS Class Location


I am new to using the MaskedEditExtender and MaskedEditValidator controls. When I went to set these up, I found that it entered the CSS class names automatically for the following properties.

OnBlurCssNegative = MaskedEditBlurNegative
OnFocusCssClass = MaskedEditFocus
OnFocusCssNegative = MaskedEditFocusNegative
OnFocusCssClass = MaskedEditError

However, I do not have these CSS classes in my Styles.css file. Where are these CSS classes located? Also, if I do include these same classes in my own stylesheet, will it override whatever the classes state in this default location or do I have to call them something different?

Insert Ignored When Time Field Populated (MaskedEditExtender & MaskedEditValidator)


I have a C#/ASP.NET web application that utilizes the Entity Framework and pages with DetailsView controls that provide CRUD operations through EntityDataSource objects. The fields in the DetailsView control are template fields with various standard ASP.NET web controls. I have a table that contains various fields with different data types, including time(7). However, the controls for the time fields also have the AJAX MaskedEditExtender and MaskedEditValidator controls attached to them.

Everything works great, until a record is inserted where a value is specified for a time field. When that happens, it acts like it's inserting, posts back, executes statements, etc. but no record is inserted. No statement is sent to SQL (as seen by a SQL trace), no exception is thrown, nothing... it acts as if everything went perfectly, it just doesn't insert the record.

Since no exception is thrown and the code being executed is inside the EF, I'm kind of at a loss as to where to track this down. I have "Enable .NET Framework Source Stepping" enabled, but it doesn't step into the EF code. Can someone help?

How to configure IIS 7.0 for ASP.NET Web Pages Razor


I'm working on a blog framework using ASP.NET Web Pages with Razor Syntax and I'm having some trouble with URL rewrites. My server is a Windows Server 2008, which runs IIS 7.0. WebMatrix is already installed on the server and .cshtml pages runs without problems, as long as they are named "index.cshtml" I don't have to supply the extension.

What does not work, is when I have URLs that does not correspond to physical files, e.g. website/post/why where the only physical file I have is post.cshtml. With IIS Express, the post.cshtml file is execute but on IIS 7.0 I get a 404 error.

Should I install the URL Rewrite for IIS 7.0? What configuration changes is required?

Configure Datasource using gridview problem


Hi i  have one asp.net textbox control..

and one dropdownlist inside gridview itemtemplate textbox..

what my problem..?

A Textbox36 has values some thing like this A1','A2','A3

i wirte this below query in sqldatasource1 and this sqldarasource1 is binded to gridview ItemTemplate Dropdownlist..

Select ItemName from Table1 where code in (@C)

Here @C im refering to Textbox36..

It show me the record if it has one value if its multiple like A1','A2','A3 it not showing/filtering ItemName data..

Whatz the probel?

Configuring website to ASP.NET 2.0 failed. You may need to manually configure this site for ASP.NET


I am trying to create a new website project in Visual Studio 2005, the website is an IIS website (ie. http://localhost/website1) and i get the following error message;

Configuring website to ASP.NET 2.0 failed. You may need to manually configure this site for ASP.NET 2.0 in order for your site to run correctly.

then when i try to debug the project i get the following error;

Unable to start debugging on the web server. The server does not support debugging of ASP.net or ATL server applications.

I am running Windows XP professional, with .NET 2.0 installed, and IIS V5.1

How can i get a simple website to debug on my machine?

Configure This: Parameterize Your Apps Using XML Configuration In The .NET Framework 2.0


There are a number of ways to configure an application in the .NET Framework 2.0. This article explores the classes of the revamped System.Configuration namespace and explains how to use XML configuration files for your app configuration settings.

Bryan Porter

MSDN Magazine June 2006

Configure a module through IIS Manager?


I've developed a custom module with a custom configuration section.  Is there a way to create a plug-in or module so IIS Manager can manage the module?  I'm looking for the ability to enable or disable it by site as well as setup various configuration properties.

Configure My Site for Microsoft Office Pop up

I saw this on another post, but it still doesn't seem to have been resolved.

How do you disable this pop-up that reads

"Microsoft Office can remember your My Site to synchronize documents stored here in Outlook and to show it when opening and saving files. Do you want Office to remember this site (http://xxx/)? Only select 'yes' if you trust this site."

It stops appearing on certain pages, but for example this appears every time you click 'Add Colleagues' link in Colleagues.

Any help?

Cannot locate Tsneu.xml to Configure SharePoint Treasure (Synonym) In MOSS 2007


Hi all,

I wanna follow this article -> http://www.codeproject.com/Articles/36203/How-to-Configure-SharePoint-Treasure-Synonym-In-MO.aspx?msg=3038555 

to figure SharePoint Treasure (Synonym) In MOSS 2007.


I created the SSP for searching file, and my SSP guid is 7xxxxxx-xx etc., but in my MOSS 2007 server,  

I have this folder -> "Drive:\Program Files\Microsoft Office Servers\12.0\Data",

but no I haven't "Drive:\Program Files\Microsoft Office Servers\12.0\Data\Applications\" folder, so I cannot locate Tsneu.xml as above article.


I can find "tsneu.xml" file in following 4 folders, I don't know which file I should modify... 


Configure BDC column to have multiple values selected


How do I Configure BDC column to have multiple values selected and make multiple entities data available in the same column.  Currently it supports only single value for an item.  This requirement is crucial need some solution immediately.

Trying to Configure Kerberos

Hello, I'm trying to configure Kerberos on a test environment. I have a Win2003 DC, a Win08 SQL 2008 machine, and a Win2003 client machine to test connectivity, with SSMS and ProClarity. Currently I have added the SPNs for MSSQLSVC and MSOLAP, and I'm trying to test connection using SSMS. From the client machine, I tried connecting to each server (DB Engine and OLAP), and checked the security log on the SQL machine to see the authentication method being used. The DB Engine connection seems to be working fine, having Kerberos all the time, yet for every time I connect to OLAP, I have two events entries first with NTLM, and then one with Kerberos. What does that mean? Is Kerberos not properly configured, or that's a normal behavior with SSAS? The Detailed Authentication Information for the events with NTLM, and the event with Kerberos are as follows: Logon Process: NTLMsp Authentication Package: NTLM Transited service: - Package Name (NTLM only): NTLM V1 Key Length: 128 -------------------------------------------- Detailed Authentication Information Logon Process: Kerberos Authentication Package: Kerberos Transited service: - Package Name (NTLM only): - Key Length: 0 -------------------------------------------- The SPNs added on the DC machine for the user used as service account for SSAS are as follows: MSOLAPSVC.4/BISQL08 MSOLAPSVC.4/BISQL08.BIDC.com   Thanks,

How use WorkflowHostingEndpoint w/ existing Activity and no .xamlx + configure in web.config

The only examples I can find on hosting non-service workflows leveraging a custom WorkflowHostingEndpoint (CreationEndpoint example in Samples) still makes use of a .xamlx file and only shows configuring a host in code. I'd like to take an existing Activity, leverage something like CreationEndpoint, and configure the service exclusively in the web.config for hosting in IIS. I'd also like the service to expose a mex endpoint. Is this possible and if so can someone refer me to an example?Blades Don't Need Reloading...

How should I configure Asp.NET on IIS 6, Sql Server 2005 and SSRS 2005 across 2 Windows Server 2003

I was running a MIS reporting solution on a single server running MS Windows 2003 Server and Sql Server 2005. The solution was built using ASP.NET 2.0 on IIS 6.0, Sql Server DB & SSRS. I now have purchased a 2nd server running MS Windows 2003 Server and Sql Server 2005. What is the best configuration to split the following application components across the 2 physical servers? ASP.NET web application SQL Server 2005 Datawarehouse SSRS Web Applications (Reports & ReportServer) SSRS Databases (ReportServer & ReportServerTempDB) The hardware configuration of the 2 servers are as follows Server 1 MS Windows Server 2003 Enterprise Edition SP2 Intel(R) Xeon(R) CPU 5150 @2.66GHz 16 GB RAM Sql Server 2005 SP3 Standard Edition Smart Array P400 in Slot 1 (SAS Array A with Spare / SAS Array B with Spare) Drive C: 68.33 GB | Drive D: 273.40 GB Server 2 MS Windows Server 2003 Standard Edition SP2 Intel(R) Xeon(R) CPU X5570 @2.93GHz 4 GB RAM Sql Server 2005 SP3 Standard Edition IBM ServeRAID-MR10i SAS/SATA Controller Drive C: 135GB | Drive D: 556 GB | Drive E: 271 GB Any suggestions would be of great help

MaskedEditExtender Gets Focus on Postback

I'm having a really strange issue with the MaskedEditExtnder. I've attached some markup for one of the textboxes. I'm using a MaskedEditExtender and MaskedEditValidator along with a CalendarExtender so the user has the option to type the date or click on an image and pick the date. So, if I enter/pick a date then select a control that forces a postback (usually a dropdownlist but not always) when the page is returned the focus goes back to the textbox I just entered the date in. So what about the MaskedEdit, MaskedEditValidator, CalendarExtender would cause the page to return focus to the control being extended? See markup below - am I missing something??  <asp:TextBox ID="txtEffectiveDate" runat="server" Width="100px" CssClass="textbox" AutoCompleteType="Disabled" Font-Bold="True"/> <asp:ImageButton ID="ImgBtnCalc1" runat="server" ImageUrl="~/images/Calendar_scheduleHS.png" CausesValidation="False"/> <cc1:MaskedEditExtender ID="txtEffectiveDate_MaskedEditExtender" runat="server" Enabled="True" TargetControlID="txtEffectiveDate" Mask="99/99/9999" MaskType=&qu

General question steps to configure mysites in SharePoint 2010

I am trying to configure the mysite web application, so I have created a DNS record "mysite" and created a web application for the mysite and created a mysite host site collection on it. Now I have read somewhere that u have to create managed paths for the profile and the mysite, which actually corresponds with the name of the DNS record/mysite webapp. For some reason when i am opening the mysite, i get a url something like http://my/my. What am i doing wrong? Can somebody just give me a step by step approach on how to configure Mysites in MOSS 2010?I am a SharePoint Infrastructure Engineer, focussed on Administration and Installation of SharePoint Server environments.

How to configure sharepoint for mobile access

Hi all, Can anyone tell me how can we configure sharepoint server for accessing sharepoint site from mobile devices such as black berry, iphone, windows phone.. I have a business requirement to access sharepoint sites from mobile.

help configure my connection string

i have created a linq to sql mapping classnow i changed the location of the server but i can't chane the connection string to the new location where can i do this ?HosDataContext db = new HosDataContext();             Sur_Accessory nor = new Sur_Accessory             {                 SurgeryAccessoriesID = Guid.NewGuid(),                 Kind = TextBox4.Text             };HosDataContext db = new HosDataContext();            Sur_Accessory nor = new Sur_Accessory            {                SurgeryAccessoriesID = Guid.NewGuid(),                Kind = TextBox4.Text            };this code brought error after changing the serverError 8 The type or namespace name 'HosDataContext' could not be found (are you missing a using directive or an assembly reference?) E:\WorksAndBackUps\Hospital\4-9-2010\MostafaRadyHospital\MostafaRadyHospital\Admin\Surgery\UCA_SurgeryRoom.ascx.cs 34 37 MostafaRadyHospital
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend