Dear Friends,
i have a query regarding the Ajax calendaExtender...
in my form there are two date controls Start Date & End Date....i have use calendar extender on them...as well there is Dropdownlist control named PO Number
i have written some code on its SelectedIndex_Change event....my problem is whenever i enter the Date's and select the PO Number from dropdownlist control the date values gets vanished or refreshed.....i also dont want the user to Edit date this so i made the Date's control(Start & End Date) as Read Only
How can i get the Date values even if page gets refreshed on SelectedIndex_Change event
of Dropdownlist control.
Pl reply,
Aamir Khan
Loading
Blocked AccountPosted Jul 6, 2012, 2:32 AM
If the target TextBox is set as ReadOnly, the value would be empty when post back. you can use a HiddenField to save the selected date value and then assign it to TextBox in client page load event. Please refer this code:
<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="TestSaveDateAfterPostBack.aspx.vb"
Inherits="CalendarUserControl.TestSaveDateAfterPostBack" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
xmlns="http://www.w3.org/1999/xhtml">
runat="server">