Click here to Skip to main content
15,886,963 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: gauge control Pin
Not Active4-Jan-11 4:07
mentorNot Active4-Jan-11 4:07 
QuestionRe: gauge control Pin
Yusuf4-Jan-11 4:12
Yusuf4-Jan-11 4:12 
GeneralRe: gauge control Pin
Hiren solanki15-Dec-10 2:51
Hiren solanki15-Dec-10 2:51 
GeneralRe: gauge control Pin
venu65615-Dec-10 3:53
venu65615-Dec-10 3:53 
GeneralRe: gauge control Pin
Not Active15-Dec-10 4:12
mentorNot Active15-Dec-10 4:12 
GeneralRe: gauge control Pin
Keith Barrow15-Dec-10 5:47
professionalKeith Barrow15-Dec-10 5:47 
AnswerRe: gauge control PinPopular
Pete O'Hanlon15-Dec-10 7:26
mvePete O'Hanlon15-Dec-10 7:26 
QuestionAutoPostBack Event Doesnt get Fired Pin
<<Tash18>>14-Dec-10 18:55
<<Tash18>>14-Dec-10 18:55 
Hi guys,
Im working on a Asp.net web page(VS2003 V1.1) here i have a page in which there is a textbox1 which is readonly and it gets filled up with the system date and i have another textbox2 with a calendar in it so that the user clicks the calendar and chooses the date and the textbox2 gets filled with the chosen date, Now here comes the issue i have another textbox called textbox3 which actually gets populated with the difference between the dates chosen. so i have written my difference in date calculation on the method textbox2_TextChanged and i have set the AutoPostBack function as TRUE. But after the user selects the date on textbox2 and navigates to textbox3 the autopostback event doesnt get fired but instead after all these 3 textboxes i have a radio button which when checked i have written a code whose autopostback is set true. Now when the checkbox is checked the autopostback event of textbox2 gets fired after which the autopostback event of the checkbox gets fired.

On Whole the AutoPostBack event of Textbox2 gets fired only when the AutoPostBack of any other control gets fired.

My friends are advising me to code the difference of the dates in JavaScript instead of coding it on the TextChanged method of the textbox. But as you see im very Weak in Javascript. Below is my code:

Page.aspx
<tr>
					<TD style="WIDTH: 211px; HEIGHT: 3px" width="211" height="3">Date</TD>
					<TD width="70%" height="28"><asp:textbox id="txtDate" runat="server" CssClass="txtboxNormal" Width="96px" MaxLength="10"
							ReadOnly="True"></asp:textbox></TD>
				</tr>
<TR>
					<TD style="WIDTH: 211px; HEIGHT: 34px" width="211" height="34">Date of Compliance</TD>
					<TD style="HEIGHT: 34px" width="70%" height="34"><asp:textbox id="txtCompDate" runat="server" CssClass="txtboxNormal" Width="96px" MaxLength="10"
							AutoPostBack="True"></asp:textbox>&nbsp; <IMG onclick="javascript:OpenCalendar('Date');" src="../DatePicker/calendar15.jpg" border="0"
							id="IMG1" runat="server"></TD>
				</TR>


Javascript for the calendar on the aspx page:
function OpenCalendar(field) 
		{
			var MyArgs = window.showModalDialog("../DatePicker/aspdatepicker.asp", "null","dialogHeight:210px;dialogWidth:180px;status:no;resizable:no;center:yes");
			var myDate = new Date();
			if(field == "Date")
			{
				document.forms[0].txtCompliedDt.value = MyArgs;		
			}
		}


Page.aspx.vb
Private Sub txtCompDate_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCompDate.TextChanged
        Dim diff As TimeSpan = Convert.ToDateTime(txtCompDate.Text).Subtract(Convert.ToDateTime(txtDate.Text))
        txtDaysPendg.Text = Convert.ToString(diff.Days)
End Sub


Kindly advise me....
Thanx in Advance..
Tash
AnswerRe: AutoPostBack Event Doesnt get Fired Pin
NeverHeardOfMe15-Dec-10 0:18
NeverHeardOfMe15-Dec-10 0:18 
GeneralRe: AutoPostBack Event Doesnt get Fired Pin
<<Tash18>>15-Dec-10 17:08
<<Tash18>>15-Dec-10 17:08 
QuestionUser control issues Pin
Swiftain14-Dec-10 18:31
Swiftain14-Dec-10 18:31 
AnswerRe: User control issues Pin
thatraja14-Dec-10 18:43
professionalthatraja14-Dec-10 18:43 
GeneralRe: User control issues Pin
Swiftain14-Dec-10 19:15
Swiftain14-Dec-10 19:15 
GeneralRe: User control issues Pin
thatraja14-Dec-10 20:09
professionalthatraja14-Dec-10 20:09 
GeneralRe: User control issues Pin
Swiftain14-Dec-10 20:13
Swiftain14-Dec-10 20:13 
GeneralRe: User control issues Pin
thatraja14-Dec-10 20:23
professionalthatraja14-Dec-10 20:23 
GeneralRe: User control issues Pin
Swiftain14-Dec-10 20:25
Swiftain14-Dec-10 20:25 
AnswerRe: User control issues Pin
Hiren solanki14-Dec-10 19:31
Hiren solanki14-Dec-10 19:31 
GeneralRe: User control issues Pin
Swiftain14-Dec-10 20:04
Swiftain14-Dec-10 20:04 
GeneralRe: User control issues Pin
Hiren solanki14-Dec-10 20:07
Hiren solanki14-Dec-10 20:07 
AnswerRe: User control issues Pin
Hiren solanki14-Dec-10 21:57
Hiren solanki14-Dec-10 21:57 
GeneralRe: User control issues Pin
Swiftain15-Dec-10 6:29
Swiftain15-Dec-10 6:29 
GeneralRe: User control issues Pin
Hiren solanki15-Dec-10 18:33
Hiren solanki15-Dec-10 18:33 
QuestionTaking Screen Shots in client browsers Pin
Hema Bairavan14-Dec-10 18:15
Hema Bairavan14-Dec-10 18:15 
AnswerRe: Taking Screen Shots in client browsers Pin
Hiren solanki14-Dec-10 18:55
Hiren solanki14-Dec-10 18:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.