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


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 :: FileUpload Looses File On PostBack

Nov 22, 2015

I have Created a Web page with master page. Page Contains two dropdown list i am using Update panel with trigger.

when I select image using fileupload after state and city changes then record submitted with Image but when i select the image after that i did some changes with state and city on that time fileupload lost its selected file or files .

View 1 Replies

Data Controls :: GridView TextBox Looses Data And Shows Empty On PostBack Of Button Click

May 7, 2015

I add this code but textbox value show in empty in database .. On Button Click the GridView TextBox loose all data ..

public partial class keyexam2 : System.Web.UI.Page {
//SqlConnection con = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=D:shubhangijayonlinepaperApp_DataQUIZ.MDF;Integrated Security=True;User Instance=True");
DataTable dt = new DataTable();
//DataRow row = dt.NewRow();

[CODE]..

View 1 Replies

AJAX :: Dynamic Added TextBox In TabContainer Looses Text Value?

Feb 8, 2010

I'm quite new to the hole AJAX world,so maybe the solution for my problem is not so tricky as i think.

I have a TabContainer where each Tab represents a language (German, English, French,...). I Add the Tabs at runtime like

[Code]...

After the postback I loose my tabs and of course its content.

[Code]...

View 1 Replies

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

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 :: 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 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 :: Highlight Contents Of Textbox With MaskedEditExtender?

Oct 6, 2010

I have a TextBox using the AjaxControlToolkit's MaskedEditExtender, the extender is using the Date mask (99/99/9999). We had modified the toolkit code to support 2-digit year (as seen in this post) which works just fine when the date TextBox initially has no value. But when the date TextBox has an existing date such as 10/04/2010, if I type in say 100409, it becomes 10/04/0910, in other words it doesn't replace the existing year but simply replace the first 2 digits of the year. If I first hightlight the entire field then type then it works. My question is is there a way to hightlight the entire date value of the TextBox upon entering the field?

I tried using javascript code textbox.focus() and .selet() but it doesn't highlight anything, it just places the cursor at the beginning of the textbox.

View 3 Replies

AJAX :: MaskedEditExtender Mask Not Showing On TextBox

Sep 26, 2013

I am using the AJAX Toolkit MaskedEditExtender to format some of my web form's textboxes.  When I load the page and start to enter data into the textboxes, the masking doesn't show. I've included my page code below:

<asp:TextBox ID="GrantExpendituresAmount" runat="server" Text='<%# Bind("GrantExpendituresAmount") %>'
Width="450px"></asp:TextBox>
<ajax:MaskedEditExtender ID="GrantExpendituresAmount_MaskedEditExtender"
runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
Mask="$999,999,999.00" TargetControlID="GrantExpendituresAmount">
</ajax:MaskedEditExtender>

View 1 Replies

AJAX :: Creating Custom Control Using Textbox & MaskedEditExtender?

Jul 23, 2010

I want to create a custom control or user control using TextBox & MaskedEditExtender control.

I am going to add this control dynamically. So to avoid setting each property each time I tried to create a custom control like this.

[Code]....

but when user enters value and clicks on submit button I get empty string but in next submit I get the value.

View 1 Replies

Data Controls :: Save (Insert) Data To Database When TextBox Looses Focus Using JQuery AJAX

May 7, 2015

I'm referring in this question [URL] ....

and now what I want is without using the submit button and save to database

View 1 Replies

Dropdown Looses Its Content After A Postback

Jun 19, 2014

I have a dropdown that is populated from the database on my page_load event, however, the drop down looses its content after a postback.

View 4 Replies

Data Controls :: Show Alert Message When TextBox Inside GridView Looses Focus

May 7, 2015

function calc(row)
{
var grdID=document.getElementById('<%=grid1.ClientId%>');
var Rate;
var excise;
var Tax;

[Code] ....

I have a javascript for amout calculation and validation for grid controlsi have called this function on grid rowdataboundfor few gridtext controls i have set onblur event & for few i have onchnage event the problem is for few grid textbox where i have validated i get the mesaage even before the control get focusi want the alert message only when that particular control has lost focus not other wise.

View 1 Replies

Databinding Int32 To MaskedEditExtender Enabled TextBox?

Mar 9, 2010

I have a master/detail scheme for editing an asp:GridView using an asp:DetailsView. One of my fields is for a phone number of type int64 (always 10 digits). I would like this field to always be displayed as (###)###-####. My issue is the first digit in the phone number is always truncated for my edit item field which I used a MaskedEditExtender to achieve the formatting.

Here is my EditItemTemplate for the details view:

<cc1:MaskedEditExtender TargetControlID="edtPROJ_Leader_Phone" Mask="(999)999-9999" runat="server" ClearMaskOnLostFocus="false" ClipboardEnabled="true" MaskType="Number" />
<asp:TextBox ID="edtPROJ_Leader_Phone" runat="server" Text='<%# Bind("PROJ_Leader_Phone") %>' ></asp:TextBox>

When my details view is displayed for editing, the text box displays(_23)456-7890 for the integer 1234567890. Also worth noting that if the property MaskType="Number" is removed, the textbox shows:

(234)567-890_. I would of course have the textbox show (123)-546-67890 after binding.

View 2 Replies

Check If Value Of Textbox Extended With MaskedEditExtender Is Valid?

May 19, 2010

Below is my code:

<asp:TextBox
ID="FromDateTextBox"
runat="server" />
<asp:ImageButton
ID="FromDateImageButton"
runat="server"
ImageUrl="~/images/calander.png" />
<ajaxkit:CalendarExtender
ID="FromDate"
runat="server"
TargetControlID="FromDateTextBox"
CssClass="CalanderControl"
PopupButtonID="FromDateImageButton"
Enabled="True" />
<ajaxkit:MaskedEditExtender
id="FromDateMaskedEditExtender"
runat="server"
targetcontrolid="FromDateTextBox"
Mask="99/99/9999"
messagevalidatortip="true"
onfocuscssclass="MaskedEditFocus"
oninvalidcssclass="MaskedEditError"
masktype="Date"
displaymoney="Left"
acceptnegative="Left"..........

I've set Culture="auto" UICulture="auto" in @Page directive and EnableScriptGlobalization="true" EnableScriptLocalization="true" in script manager to have client culture specific date format in my textbox.

I also have a Go button on my page on which I will do a partial post back. So, I want to validate the FromDateTextBox in javascript when the Go button is clicked.

UPDATE

I know how to create a javascript click handler. But because masked editor is already validating the date on focus shift, I'm thinking there should be some boolean property (like IsValid) exposed by it which will allow me to see if the text box contains valid date.

FURTHER TRIALS

I also tried below code and Page_Validators[f].isvalid always returns true even when the date is invalid and MaskEditValidator shows me a red star near the Text box.

function isDateValid() {
var b = true;
for (var f = 0; f < Page_Validators.length; f++) {
if (!Page_Validators[f].isvalid)
b = false;
}
return b;
}
$('#GoButton').click(function() {
if (!isDateValid()) {
return false;
}
loadProducts();
});

View 2 Replies

Can Assign Date Inside Textbox Using MaskedEditExtender

Jun 28, 2010

I am using MaskedEditExtender so that user can enter date inside textbox with specified mask like "DD/MM/YYYY".

i am facing problem when i am trying to assign value within text box from some string variable while when i am directly typing value within text box it's successfully enter like "28/06/2010"

How can i assign value within masked text box from variable. For mask text box i am using MaskedEditExtender of AJAX.

View 1 Replies

Web Forms :: Use MaskedEditExtender For Textbox To Accept Time?

Mar 26, 2016

I want to set my textbox textmode="time"

View 1 Replies

AJAX :: Comma In Textbox When Postback?

Jan 21, 2010

I use AjaxControlToolkit 30930. I use modalpopupextender with textbox control and I found that there is a comma append textbox value every postback. Are ther any solution for me. I don't want to use previous version because I need AsyncFileupload.

View 6 Replies

AJAX :: Set A Textbox's Value Before A Asynchronous Postback?

Mar 16, 2010

Is there any way can let me set a textbox's value before the asynchronous postback. but I don't want to add a handler for a control which caused that asynchronous postback, because there are too much control can cause that. I want to know if there is a client event would be caused before the postback.

I tried the event initializeRequest of PageRequestManager to do this, but it did not work, it seems like the request has been generated when this event was executed, the value i set in this event for textbox did not be sent to server.

here is a page I used to test

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> runat="server">
<script

[Code]....

View 10 Replies

AJAX :: Can't Access Dynamically Created Textbox In Postback

Sep 20, 2010

I have a script which creates a dynamic textbox (and more) in an AJAX async post back. But when I try to acess the textbox I am told "Object reference not set to an instance of an object". I have been strugleing with this for a long time. This is written in C# .Net 4. The line causing the problem is the very last one where I have tbGameName.Text.Trim()

[Code]....

View 2 Replies

AJAX :: Textbox Not Writable After Partial Postback Of Updatepanel?

Mar 4, 2010

i got a strange problem. my project was ok before implimenting ajax. i have just implimented ajax in one page only with Tabcontainer and updatepanels only nothing else. almost all controls are devided into different Tabs with respective update panels.

mostly it is working ok. but the problem is :

1. in some controls i am not able to write anything even the control is "Enabled=True" and focus is on the same control after partial postback.

2. and as soon as i press Tab control goes to Address bar.

3. some time tab key is also not working.

here some code :

[Code]....

Here the Logic :

as soon as i type inception date; expirydate is automatically calculated and focus should come to sumassured. after this it should allowed to enter sumassured amount, which is not allowing to write.

As soon as i change tab and come back to original tab then i can write values normaly.

View 4 Replies

AJAX :: Forcing Postback On Textbox - Update Not Working

Mar 8, 2010

Hoping I have placed my question in the correct forum.

I am writing an application that simply updates a text box (contained in a AJAX UpdatePanel) via a thread. the eventual idea being that the textbox will be placed in the master page, and a thread will poll a table to check for status messages. 90% of the code works as it should, the only side that is not working, is physically updating the textbox. The value of the textbox is being updated, but it is not being reflected on the screen. When the text is updated in the textbox, the OnChange event is not firing (as it shouldn't), but I still need the textbox to be updated. The textbox is being updated prgramatically, and not by the user.

When the thread triggers, it just fires an event, which right now just updates the textbox with the current date time. I've tried a million and one different ways, but still no luck :( Anyone know where I am going wrong?

Here is my code:

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Always" runat="server">
<ContentTemplate>
<asp:Table ID="Table1" runat="server">
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lblThread1" runat="server" Text="Thread1"></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtThread1" AutoPostBack="true" runat="server"></asp:TextBox>
</asp:TableCell>
<asp:TableCell>
<asp:Button ID="btnstartThread1" runat="server" Text="Start Thread 1" onclick="btnstartThread1_Click" />
</asp:TableCell>
<asp:TableCell>
<asp:Button ID="btnStopThread1" runat="server" Text="Stop Thread 1" onclick="btnStopThread1_Click" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ContentTemplate>
</asp:UpdatePanel>

public partial class _Default : System.Web.UI.Page
{
private static clsThread1 _objObject1 = new clsThread1();
private static Thread _objThread1;

//****************************************
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
_objObject1.UpdateThread1Time += new EventHandler(UpdateThread1TimeEvent);
}
}
//****************************************
private void UpdateThread1TimeEvent(object sender, EventArgs e)
{
this.txtThread1.Text = System.DateTime.Now.ToString();
}
//****************************************
protected void btnstartThread1_Click(object sender, EventArgs e)
{
_objThread1 = new Thread(new ThreadStart(_objObject1.StartProcess));
_objThread1.Start();
while (!_objThread1.IsAlive) ;
}
//****************************************
protected void btnStopThread1_Click(object sender, EventArgs e)
{
if (_objThread1 != null)
{
_objThread1.Abort();
_objThread1.Join();
}
}
//****************************************
}
public class clsThread1
{
public event EventHandler UpdateThread1Time;
public void StartProcess()
{
while (true)
{
UpdateThread1Time(this, EventArgs.Empty);
}
}
}

View 6 Replies







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