Web Forms :: MaskedEditExtendor And MaskedEditValidator Is Not Working?
Mar 14, 2011I want to use MaskedEditExtendor and MaskedEditValidator togather to perform validation for USA phone number.
My aspx code is below.
[Code]....
I want to use MaskedEditExtendor and MaskedEditValidator togather to perform validation for USA phone number.
My aspx code is below.
[Code]....
I have a panel, with several textboxes and an ImageButton inside of it. One of the textboxes has a MaskedEditExtender and a MaskedEditValidator associated with it. When I hit enter from any other textbox besides the one with the MaskedEditValidator the defaultbutton that is defined in the Panel's DefaultButton property handles the enter key.However, when I am in the textbox with the MaskedEditValidator, the first button on the form is receiving the enter key. Now, if I take the MaskedEditExtender off of the page, and just leave the MaskedEditExtender, everything behaves as it should.Can anyone offer any insight into how I may get this to work properly, or is this a known bug?I tried searching the forums and found a similar post, but no conclusion was ever reached.
View 3 RepliesI am currently using a maskedEditValidator to do some validation checks in a field, everything works great until I attempt to insert a maximium value. My current maskededitvalidator looks like this:
[Code]....
When I add the maximium value into it, it pops up on the details view and will not go away thus not allowing for the new record to be entered. From what I have seen through various other post is that this is a know bug in the maskededitvalidator, and that if I want to do this to do it in a custom validator. My problem is I have no clue as to how to do this in a custom validator.
Well i cannot find a solution,so..
I will post my code.The problem is that whatever date i try (i use greek d/m/y but i also tried m/d/y) it gives me the "error!" tooltip.
I've tried complex code,simple code, ValidationExpression,Globalization,no globalization.Nothing works.
Anyway to it's simplest form:
Code:
[code]....
I am using the MaskedEditExtender and MaskedEditValidator, but have experienced some strange
behaviour. (See code example below). When entering a date into the textbox this is what I see:
1. The mask
2. Entering the date and time e.g. "19-01-1980 10:11:12"
3. When removing focus from the textbox the result is: "19-01-1980 19:01:19"
The six first digits of the date is copied as the time? If entering a day of the month larger than 23 and any given month, year and time (eg. 25-10-1980 12:12:12) the validation fails as the six first digits are copied to the time resulting in a time 25:10:19 which obviously is not valid.
I have downloaded the AJAX toolkit sample code and experience the exact same behaviour. When running the AJAX Toolkit samples from[URL] works fine!
Additinal info: Culture is danish (DateTime format is dd-MM-yyyy hh:mm:ss). Tried changing my systems culture to en-US but same behaviour.
Code:
[Code]....
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.ProblemThe 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">
<EditItemTemplate>
<asp:TextBox ID="txtStartTimeEdit" runat="server" Text='<%# Bind("StartTime") %
[code]...
I'm trying to disable a MaskedEditValidator control through JavaScript.
The following approach works for other types of validors (RequiredFieldValidator) but doesn't seem to work for the MaskedEditValidator
[Code]....
I have 2 scenarios here for using the MaskedEditValidator for a date field. I'll start with the easier one first.
1) I have a date field. I want to set the MaskedEditValidator's minimum value property to TODAY's date. So for example, if the user enter's a date earlier than today, the AJAX control will show a message stating "you can't input a date earlier than today".
2) I have 2 date fields - 1st one is 'start date' and 2nd one is 'end date'. I want to set the MaskedEditValidator for the end date so that the minimum value property is the date from the 'start date' field. So this way, the user can't enter a date in the 'end date' field that is earlier than what is in the 'start date' field.
Are these 2 scenarios possible? Or should I try another option (Javascript, Jquery, etc...)?
I have text box to enter a phone number. I'm using AJAX MaskedEditExtender and MaskedEditValidator to validate the phone.I have no problem with mask but the problem nothing happen when I enter for example only 3 number then lose the focus but as soon the focus on I will see the error message and it will disappear as soon as I write one number.
all what I want to get the error message if the user did not enter 9 numbers after lose the focus.
here is my code: <asp:TextBox ID="txtHomePhone" runat="server" ontextchanged="txtHomePhone_TextChanged"></asp:TextBox>
<cc1:MaskedEditExtender ID="txtHomePhone_MEExt" runat="server" TargetControlID = "txtHomePhone" Mask = "(999)999-9999" MaskType ="Number" AutoComplete="False"
[code]....
I have the following tabpanel (it actually contains a bit more content, but that content doesnt influence my issue):
[code]....
When I remote the MaskedEditExtender and MaskedEditValidator, it doesnt show that (undesired) behaviour anymore.Is there something special these controls do that cause them to refresh? Is there a workaround for this?
Something "weird" is happening with my ASP.NET application. I have a MasterPage with WebForms, and inside one of them, I have an ASP TextBox which is controlled by the MaskedEditExtender/MaskedEditValidator couple. Underneath, I have a GridView with 2 columns, an Edit ASP Command Field, an ItemTemplate which contains an ASP ImageButton with a Delete CommandName linked to a GridViewDelete Event through the OnRowDeleting attribute. The GridView is binded with SQL Server data while the page is loading.
It appears that once the page is loaded, if I want to delete a row by clicking on the ASP ImageButton, nothing appears. I have first to do something else with the GridView (raise an Edit Event for example), then it's accessible. I try different stuff to catch the source of the problem, and the "weird" part appeared when I deleted the MaskedEditValidator, just keeping the MaskedEditExtender : the Delete ASP ImageButton worked since the page loads!
So basically when i open the page i get the error above.
I've removed-added the toolkit toolbox.The error occurs p.e. in MaskedEditvalidator when i remove the mask from
MaskedEditExtender.Ok i know that it probably needs a mask and it crashes but what the hell is the
C:UsersswaltherProjectsAspNetAjaxReleases30930AjaxControlToolkitSourceAjaxControlToolkitMaskedEditMaskedEditCommon.cs ?? I don't even use c: for any project.Who is swalther?WTH?
And is there a MaskedEditCommon.cs in the toolkit?I did not find any MaskedEditCommon.cs in whatever, version library or whatever i downloaded.
Error:[ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex] System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7490863 System.String.Substring(Int32 startIndex, Int32 length)
[Code]....
The following setup seems to work fine on the client side, however when I post back and check Page.IsValid, the value is false. I also looked at mevDate.IsValid and it's false. It seems that setting the CultulreName on the MaskedEditExtender is sufficient to get the MaskedEditValidator to emit the correct JavaScript, but on the server side of things it doesn't work. When I flip CultureName to "en-US" everything works as expected.
I created a one Java script calender. Its working fine in ie6 but its not working in firefox. I'm new to this java script so kindly give your suggestion as soon as possible.
Page
Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default" %>@
Register
Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI"
TagPrefix="asp" %>
DOCTYPE
html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN".......................
Url rewriting not working on live server in asp.net but locally working fine. but locally it's not case sensitive.
View 1 RepliesI want to export the grid data to excel then write the following code but the following lines of code are working at firefox3 but not at ie8(no response).
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.AddHeader("Content-disposition", "attachment;filename=ProjectTimeSheet.xls");
System.Web.HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
string excelFile = "";
excelFile = ConvertToExcel(PrepareGridViewForExport()); //generate formated table for excel
System.Web.HttpContext.Current.Response.Write(excelFile);
System.Web.HttpContext.Current.Response.End();
I am Using "MaskedEditExtender" along with "MaskedEditValidator" in my page with a textbox. it is not working and showing the NullReference exception. the call stack showing the following details
[NullReferenceException: Object reference not set to an instance of an object.]
AjaxControlToolkit.MaskedEditValidator.OnPreRender(EventArgs e) in C:UsersswaltherProjectsAspNetAjaxReleases30930AjaxControlToolkitSourceAjaxControlToolkitMaskedEditMaskedEditValidator.cs:384
If Not IsDBNull(ext) Then
ext = LCase(ext)
End If
Select Case ext
'Case ".htm", ".html"
' type = "text/HTML"
'Case ".txt"
' type = "text/plain"
'Case ".doc", ".rtf"
' type = "Application/msword"
'Case ".csv", ".xls"
' type = "Application/x-msexcel"........................
i do have a form. inside specific asp:textboxes are "secured" by RequiredFieldValidator and RegularExpressionValidator running. in another div-element i do have buttons, which are expected to load different pages of my website. the problem is: when i click on either of these buttons it is not working as my validation-controls are fired prior to the onclick-button-events.
View 10 Replieshave a CustomValidator that I am trying to use. I have a couple Validation groups so I set those 2 different groups up in my case. The CutomValidator is validating the field when I click the button and it puts out the error message however its letting the button event insert the data.
[Code]....
i m facing a issue in my code i m calling a user control which is in master page, and in row databound i m calling it and it is working fine but on select index change of checkbox it is not working
protected void chkIntClient_SelectedIndexChanged(object sender, EventArgs e)
{
UserControls_AlwaysVisible uc = this.Page.Master.FindControl("Alwaysvisible") as UserControls_AlwaysVisible;
uc.Visible = true;
ArrayList raters = new ArrayList();
CheckBox chkselproducer;
[code]...
After the implementation of ajax drag and drop, we have observed that which is working fine in IE and Firefox and not in chrome and safari, In Google chrome and Safari when we try to drag a module, the page getting scrolling to the top of the page.
View 1 RepliesOK Here is the situation:
I have a web app with a table of statistics on our salesmen's customers, and each row has a sparkline graph showing the general trend of the sales data for the last 12 months. Each page shows a particular salesman's customer list, and some of them can have an enormous number of customers = an enormous number of rows = an enormous number of sparklines (e.g. one in particular has 125 and takes 15 seconds to load).
For this reason, jQuery sparklines could not be used - they completely pinned the CPU of a user accessing a page with a lot of sparklines with IE.
So I moved on to using the Google Chart API, which worked much better, except for two issues: 1) it's on a secure site, and the Google Chart API URL is only served over HTTP (solved by using a small wrapper script to download the graph dynamically and re-serve it from our secure server); and 2) on a page with 125 sparklines, it was still very slow due to the number of requests (even when the 0-9 server prefixes are used to maximize the # of available connections).
So my next step beyond this was to try to make each of the "download/grab/re-serve image" method calls asynchronous - and it worked!
...but only on my dev box running in debug mode.
When I pushed it up to the live site, it was faster, but it left some of the images unloaded, which is of course unacceptable.
So here is what I was hoping some SO hotshot would know:
1) Why are my asynchronous method calls working while debugging, but not working on the live site?
2) Is there any easier way to get a large number of sparklines of some sort to load quickly on a secure server without making me want to tear my hair out?
2a.) Does anyone have any experience using the ASP.NET Chart Library? Is this something I should investigate?
2b.) A co-worker suggested I make my own sparkline routine using a 1x1 CSS background image and varying the height. The problems are a) it is completely un-extensible in case we want to make changes; b) it seems hacky as hell (leaves about a bajillion DIVs per sparkline in the markup); and c) I have no idea if it will be fast enough when there are 100-200 of them on one page - what are your thoughts on the feasibility of the 1x1 sprite approach?
I mean, what is the faster way to get as fast as I can more than one table with stored procedure? Is there any study what is faster and why? There is a big problem getting more than one table at once with Entities, so the only way is DataSet. But I was told DataSet work very slow. Is that true?
View 2 RepliesI am using vs2008 pro. my problem is that javascript debugger is not working on mozila firefox but working fine on IE8.
View 1 Replies