AJAX :: MaskedEditExtender Gets Focus On Postback?

Sep 2, 2010

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??

[Code]....

View 3 Replies


Similar Messages:

AJAX :: MaskedEditExtender Looses Format When Not In Focus?

Sep 23, 2010

I have a tex box which I'm using to capture a bank sort code.

I want to use the AJAX MaskedEditExtender so the user only ever inputs the data in this format 12-34-56.

Here is my extender code:

[Code]....

This initially works fine, however when i remove the focus on this text box the input removes any hyphen and the texbox value is left like this 123456.

View 2 Replies

AJAX :: Postback Causes MaskedEditExtender To Clear Current Value?

Feb 26, 2010

For many of the Ajax ControlToolkit, a post back causes a lot of screw up with these controls. One example is the MaskedEditExtender. I have a webform that has various parts which depends on a RadioButtonList control option. Some part of webform maybe hidden or shown base on what option the user chose from the RadioButtonList control. The RadioButtonList control is set to autopostback. Let's say there is the txtDate textbox that regardless what option the user chose from the RadiobuttonList control, it will always shown on the webform. Let's say the user type in 2/5/2010 on the txtDate control but later on decides to pick a different option in the RadioButtonList control. After the autopostback from the RadioButtonList control, the txtDate that contained 2/5/2010 is now wiped out or cleared. So, my question is, how do I prevent this from happening?

View 1 Replies

AJAX :: TextBox With MaskedEditExtender Looses Value After Postback?

Mar 19, 2010

I have a webform with two textboxes both with maskededitextender with date type, and a button.

When I press the button and the postback occurs the first textbox looses the value and shows the date mask.

What to do so this doesn't happen and the textbox doesn't loose the value.

View 3 Replies

AJAX :: MaskedEditExtender Control Rounding On Postback?

Apr 5, 2010

I have a few MaskedEditExtender controls on my page. QA has just notified me that on certain occasions, the values entered into the fields are being rounded down.

[code]....

When focus is set to the field, you get this: $ __,___.__ the cursor is to the left of the period and and you can enter any amount and if you type "period" it will move to the cents section. When tested, if you enter 55555 and tab out to another field everything is fine, but the field looks like this.. $ 55,555.__ now any posts that occur change this example to $ 50,000.00 does anyone know why and how i can fix this?

View 4 Replies

AJAX :: MaskedEditExtender And MaskedEditValidator Causing Refresh/postback?

Sep 7, 2010

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?

View 1 Replies

AJAX :: How To Retain Focus After Postback (updatepanels)

May 14, 2010

We currently have a page with several user controls (8 of them) and when a control that is contained in an updatepanel initiates a postback the focus is not retained. In some cases, it looks like the focus is sent to the top of the page, and in other cases the focus looks like it is sent to the control with the TabIndex=1.

I have tried 3 different solutions and they all end up with the same result.

The first two were from article:
[URL]

Solution 1: At the end of the server event executed in postback, add:

[Code]....

The article says both of those solutions worked, but for us, neither of them did.[Code]....
ASPX.CS

[Code]....

[Code]....

In all 3 scenarios the control we want to have the focus gets the focus for a split second and then the focus is cleared (set to the top of page, or TabIndex=1).

View 3 Replies

AJAX :: Update Panel Keep Focus On Page Postback ?

May 31, 2010

I've got a page that posts back constantly and if im on the inputbox thats instide the update panel i loose focus on postback

how would i get it to recognise that im on the textbox in the update panel and keep focus on it.

View 3 Replies

Set Focus On Textbox After Postback?

Apr 22, 2010

I have a search page with 3 TextBoxes that users can filter a search with.

I have put the focus on the TextBox that contains text. If more than one contains text just focus on last TextBox.

[code]...

After the code runs and a user searches, the focus comes to the beginning of the TextBox, not the end where it would be presumed. How to put insert marked at the end of that TextBox?

View 2 Replies

Web Forms :: How To Set Focus To A Textbox On A Postback

Jan 20, 2010

how do i set focus to a textbox on a postback

View 1 Replies

Javascript - How To Set Focus In TextBox After Postback

Oct 27, 2010

I have a simple page where I want to filter a ListBox based upon a value(s) in a textbox - both are in an UpdatePanel.This works correctly, however, after the postback the textbox had lost focus...so I set focus back in the page_load.Then I noticed that the cursor was now at the beginning of the text when I want it at the end so the user can carry on typing, so I added an onfocus(...) attribute to the textbox to set the value back to itself (see code below).This works the first two times, but then it stops setting focus to the textbox?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListTest.aspx.cs" Inherits="SalesForceTest.ListTest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
[code]...

View 1 Replies

Maintain Focus To A Usercontroll On Postback?

Feb 8, 2010

How can I maintain focus to a textbox which is placed inside a usercontroll while on postback.

View 6 Replies

Web Forms :: Set Focus To Checkboxlist After Postback

Aug 12, 2010

know how to set focus for checkboxlist.

View 7 Replies

JavaScript - Set Focus To End Of Text In Textbox After Postback?

Oct 27, 2010

I've got a simple ASP.Net form with txtBox and btn.

User click btn, which adds text to an ASP:TextBox in a postback (its adding a known "starter text".

After the postback I'd like the focus to be set to the end of the text in the textbox.

If I call Page.SetFocus(...) or txtBox.Focus() then the txtBox gets focus, but at the beginning of the text - which means if the user starts typing, they'll be in the wrong place.

e.g.

cursor100-01

would like it to be

100-01cursor

I've tried the following in the textbox:

onfocus="alert('focus');this.value = this.value;"

but the "alert" only appears the first two times? Then nothing?

View 1 Replies

Put Focus Back On A Gridview's Selected Row After Postback?

Jul 5, 2010

Is it possible to put focus back on a gridview row after that a selection of the row generates a postback?

I'm trying to add an onkeydown handler on the gridview rows in order to use the keyboard for navigation. My problem, I believe, is that after the first postback, the selected cell loses focus, and so the next key stroke is not caught by the cell.

I have the following code

The grid view

<asp:GridView runat="server" ID="gdvPersons" AutoGenerateColumns="false"
onrowcreated="gdvPersons_RowCreated" onselectedindexchanged="gdvPersons_SelectedIndexChanged">
<Columns>
<asp:TemplateField HeaderText="Name">

[Code]....

View 1 Replies

Returning Focus (Position) In Panel After PostBack?

Mar 8, 2010

VWD 2008 Express. Visual Basic.

I have a gridview control within a panel control. The gridview can contain up to 128 rows. The panel is 300px high and has a vertical scroll bar that allows me to scroll to the row I want to see or edit in my gridview. When I click the "Edit" button on an item within my gridview, the page posts back and returns to panel scrolled all the way back to the top. I have to then scroll back down to get to the item I want to edit in my gridview (which has correctly been placed in edit mode). How can I make the panel return to its postion (or stay in its postion) after a postback without me having to manually scroll back down?

View 8 Replies

Forms Data Controls :: Keep Focus On Textbox After Postback?

May 11, 2010

I have created a async search of a gridview, where the displayed data only shows items that match whatever is typed into the text box. After i type the search the grid refreshes the results, but the focus goes away from the textbox itself, which gets really annoying. is there any way to keep the focus on it?

[Code]....

View 5 Replies

AJAX :: Can Use A MaskedEditExtender With A Combo Box

Feb 23, 2011

I want masked ComboBox, so I use a MaskedEditExtenderwith a ComboBox. The two controls came from the ajax control toolkit. But I got an error: "Unable to cast object of type 'AjaxControlToolkit.ComboBox' to type 'System.Web.UI.WebControls.TextBox'". Is there a way a can use a MaskedEditExtender with a combo box?

View 4 Replies

AJAX :: MaskedEditExtender Multilanguage?

Sep 26, 2010

<cc1:MaskedEditValidator
ID="MaskedEditValidator5"
runat="server" [code]....

View 1 Replies

C# - How To Call Postback From TextBox On TextChange Event Without Focus Being Changed

Feb 10, 2011

I need to databind the gridview inside the Ajax UpdatePanel each time user types letter inside my TextBox control. How to override the TextChange event to force it do postback for me?

<script type="text/javascript">
function ace1_itemSelected(sender, e) {
var hdCustID = $get('<%= hdCustID.ClientID %>');
hdCustID.value = e.get_value();
</script>
[code]...

View 2 Replies

User Controls :: Set Focus To TextBox Only On First Page Load And Not On PostBack

Mar 13, 2014

In my application i have set focus to textbox during initial get request,

then i want to disable the focus after postback?

how we can do it?

View 1 Replies

AJAX :: MaskedEditExtender Decimal Values?

May 10, 2010

I am using MaskedEditExtender on my textbox.Set the masktype to number.Now the user can enter decimals also at any place to my textbox.Is it possible for my MaskedEditExtender to still accept that or I have to use custom javascript/ regex for this.

View 5 Replies

AJAX :: MaskedEditExtender Not Functioning Properly

Jun 7, 2010

I'm having a issue with a MaskedEditExtender, I am using it for a datetime field with the sqltable field definition as smalldatetime, I have several error messages such as emptyvalue error message, minimium value error message along with a few others.

Everything works fine until i put a maximium value, on selecting either insert or edit it throws the error even if the date entered is between the minimium value and the maximium value and will not go away. As you are aware smalldatetime has a max value of 06/06/2079 which won't be a issue in my lifetime but for validation purposes I want to make sure the user doesn't accidentally enter a value larger than the max value thus causing an error on insert or edit.

View 6 Replies

AJAX :: How To Clear The Textbox Associated MaskedEditExtender

May 24, 2010

the code like below, how to clear tbxDate when input an invalid date use javascript

[Code]....

View 3 Replies

AJAX :: Strange Results With MaskedEditExtender?

Oct 12, 2010

I've inherited a web project from another company, and I'm having a weird issue with a phone number mask.

If the ClearMaskOnLostFocus is "true", I lose the mask in the edit field (this is a editing screen for an existing record). If set to false, the mask is present, but the leading digit is truncated, and will write back to the DB an incorrect number if submitted, with that leading "_".

True = 8885551212
False=(_88)-555-1212
The DB field a a varchar(20) -- don't ask me why.
<asp:MaskedEditExtender ID="MaskedEditExtender3" runat="server"
learMaskOnLostFocus="true" MaskType="Number"
Enabled="True" Mask="(999) 999-9999"
TargetControlID="Phone_Number">
</asp:MaskedEditExtender>

I'm recently back at work after a long layoff period, and my ASP is a little rusty.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved