₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,060 members, 8,420,092 topics. Date: Thursday, 04 June 2026 at 11:14 AM

Toggle theme

Helpppppppppppp! Asp.net Code Issue - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingHelpppppppppppp! Asp.net Code Issue (828 Views)

1 Reply (Go Down)

Helpppppppppppp! Asp.net Code Issue by spora1(op): 3:26pm On Sep 18, 2009
A friend is having issue on the code below.

There are two forms on the server, the old and the new form, when the created date is greater than 16, the computer should load the first form and load the second form if otherwise

but the computer keeps loading the first form


<% if CreatedDate > 2009-09-16 then%>
onClick="document.form.action='/Intranet/HRForms/formstest/<%=formNameLink%>.asp?pv=1&formID=<%=rs("formID"wink%>&code=<%=rs("code"wink%>'">
<%else%>
onClick="document.form.action='/Intranet/HRForms/forms/<%=formNameLink%>.asp?pv=1&formID=<%=rs("formID"wink%>&code=<%=rs("code"wink%>'">
<%end if%>

What do you think is wrong pleaseeeeeeeeeeeeeeeeeeee
Re: Helpppppppppppp! Asp.net Code Issue by Kobojunkie: 3:33pm On Sep 18, 2009
<% if CreatedDate > 2009-09-16 then%>
onClick="document.form.action='/Intranet/HRForms/formstest/<%=formNameLink%>.asp?pv=1&formID=<%=rs("formID"wink%>&code=<%=rs("code"wink%>'">
<%else%>
onClick="document.form.action='/Intranet/HRForms/forms/<%=formNameLink%>.asp?pv=1&formID=<%=rs("formID"wink%>&code=<%=rs("code"wink%>'">
<%end if%>


@Poster, why not do this neatly in backend code.
As for your if statement above, your comparison there is likely being handled as string to string comparison and not Date to Date. If you cast both to date and try again, it will likely work.
Re: Helpppppppppppp! Asp.net Code Issue by spora1(op): 3:50pm On Sep 18, 2009
Tx Kobo,

Pls, how can he do the casting? He is really new in asp
Please, help
Re: Helpppppppppppp! Asp.net Code Issue by Kobojunkie: 4:01pm On Sep 18, 2009
Convert.ToDateTime(CreateDate)
1 Reply

C# - Capturing File Name From A FileUpload Control In Asp.netTutorial: How To Return Html In Json Response Using Asp.net And JqueryVb.net Code To Display Image In Picturebox From Sql Server234

Assignment On Pascal Programing (very Urgent)share what u known about Sap ProgrammingHow Dyu Do This In Ruby?