Reputation:
What am I missing in my code to make display the calendar in my form. I get error object expected. C#
http://www.martinesexpress-inc.com/PhoneControl/MyOrders.aspx
<style type="text/css">
.style1
{
width: 100%;
}
</style>
</head>
</div>
<table class="style1" style="width:100%; color:black; background-color:orange; outline-color:Green; ">
<tr>
<td><b>Enter Start and End Dates</b></td>
</tr>
</table>
<p>
</p>
<table class="style1" style="width:100%; color:black; background-color:orange; outline-color:Green; ">
<tr>
<td>
</td>
<td><b>
Start Date</b></td>
<td><b>
End Date
<asp:PlaceHolder ID="phGoBack" runat="server">Go <a class="link" href="Default.aspx">Back</a></asp:PlaceHolder>
</b></td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:TextBox ID="txtFrom" CssClass="fields" runat="server"></asp:TextBox>
<img alt src="images/cal.gif" onclick="displayDatePicker("txtFrom");" />
</td>
<td>
<asp:TextBox ID="txtTo" CssClass="fields" runat="server"></asp:TextBox>
<a href="javascript://"><img alt src="images/cal.gif" onclick="displayDatePicker('txtTo');" /></a>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Literal ID="litCountRecords" runat="server"></asp:Literal>
</td>
<td>
<asp:Button ID="btnRun" runat="server" onclick="btnRun_Click" Text="Run"
Width="37px" />
Upvotes: 0
Views: 322
Reputation: 2271
Usually when you get:
[NullReferenceException: Object reference not set to an instance of an object.]
You're trying to use "something" that isn't an instance of an object/class.
Can we see some code behind?
Upvotes: 1
Reputation: 6612
to pass a control to javascript, you use (this) not ('txtTo')
but that doesn't look like your problem.... this is not a jscript error.
Upvotes: 1