I am a newbie to ASP...I have a CMS that has a "insert todays date" in to a textbox I would like to have a link to have it insert tomorrow date instead this is what I have so far the current date link works fine but the tomorrow link doesn't....
<asp:textbox Columns="50" ID="txtHeadlinedate" MaxLength="255" runat="server" />
<span class="SmallNotes">[ <a href=http://www.htmlforums.com/archive/index.php/"#" onclick="javascript:document.getElementById('txtHeadlinedate').value='<%=formatdatetime(newnow,1)%>';">Insert
Current Date</a> ]</span>
<span class="SmallNotes">[ <a href=http://www.htmlforums.com/archive/index.php/"#" onclick="javascript:document.getElementById('txtHeadlinedate').value='<%=
dateadd("d", 1, todaydate)%>';">Insert
Tomorrow's Date</a> ]</span>
The first link displays in correctly like - Thursday, March 29, 2007
The Tomorrow link displays like - 3/30/2007 12:00:00 AM
I need the "Tomorrow" link to display like the today link... any ideas???cant you wrap the code:
dateadd("d", 1, todaydate)
with formatdatetime?
ie:
formatdatetime(dateadd("d", 1, todaydate),1)
??make it runat="server" and do that in the code behinds. control.Atrributes.Add("onclick","");
<asp:textbox Columns="50" ID="txtHeadlinedate" MaxLength="255" runat="server" />
<span class="SmallNotes">[ <a href=http://www.htmlforums.com/archive/index.php/"#" onclick="javascript:document.getElementById('txtHeadlinedate').value='<%=formatdatetime(newnow,1)%>';">Insert
Current Date</a> ]</span>
<span class="SmallNotes">[ <a href=http://www.htmlforums.com/archive/index.php/"#" onclick="javascript:document.getElementById('txtHeadlinedate').value='<%=
dateadd("d", 1, todaydate)%>';">Insert
Tomorrow's Date</a> ]</span>
The first link displays in correctly like - Thursday, March 29, 2007
The Tomorrow link displays like - 3/30/2007 12:00:00 AM
I need the "Tomorrow" link to display like the today link... any ideas???cant you wrap the code:
dateadd("d", 1, todaydate)
with formatdatetime?
ie:
formatdatetime(dateadd("d", 1, todaydate),1)
??make it runat="server" and do that in the code behinds. control.Atrributes.Add("onclick","");