Hello all this is my first post on here as I am new to coding and ASP.Net. I'm using a LINQ to SQL Class to a stored procedure that I created in SQL.
Basically what I have done is setup a start date and end date which captures a time period. From then I want that to trigger a query by pressing an Update buttony. I can get the Calander Extender working but whenever I hit "Update Button" nothing happens. What I want is to hit the "Update" button so it pulls the dates in which the user has enters and runs the query and then populate the list in a Gridview.
I've read through so many posts and forums and just can't get it to work, I'm not entirely confident so if anyone could assist that would be great.
Here is the code I have so far, and as I said this is my first time posting so I'm very new to all this sorry to be such a newb...lol
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HundredDayCheck.aspx.cs" Inherits="HundredDayCheck" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<style type="text/css">
a:link {
font-family: Verdana;
text-transform: uppercase;
font-size: medium;
color: #aaaaaa;
}
.style1
{
width: 100%;
margin-bottom: 0px;
}
.style2
{
font-family: Verdana;
font-size: large;
text-decoration: underline;
width: 286px;
}
.style3
{
width: 500px;
text-align: left;
}
.style4
{
width: 286px;
}
.style5
{
width: 306px;
text-align: left;
}
.style6
{
width: 500px;
text-align: right;
}
.style7
{
width: 104px;
text-align: left;
}
.style8
{
width: 500px;
text-align: right;
}
.style9
{
width: 106px;
text-align: left;
}
.style10
{
width: 286px;
font-size: small;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager" runat="server" />
<table class="style1">
<tr>
<td class="style2">
<strong style="font-size: x-large">100 Day Survey Check</strong></td>
<td class="style6">
</td>
<td class="style7">
</td>
<td class="style8">
</td>
<td class="style9">
</td>
<td class="style3">
</td>
<td class="style5">
<strong style="font-size: x-large">
<asp:Image ID="Image1" runat="server" Height="68px"
ImageUrl="~/images/Logo.jpg" Width="236px" />
</strong></td>
</tr>
<tr>
<td class="style10">
<asp:Label ID="Label4" runat="server"
style="font-weight: 700; font-size: small; font-family: Verdana; text-align: left;"
Text="Date:"></asp:Label>
<asp:Label ID="Date_Stamp" runat="server"
style="font-size: x-small; font-family: Verdana; text-align: left; color: #000000;"></asp:Label>
</td>
<td class="style6">
</td>
<td class="style7">
</td>
<td class="style8">
</td>
<td class="style9">
</td>
<td class="style3">
</td>
<td class="style5">
</td>
</tr>
<tr>
<td class="style4">
<asp:Button ID="Update" runat="server" Text="Update" Width="145px"
style="font-weight: 700" />
</td>
<td class="style6">
Start Date:<td class="style7">
<asp:TextBox
ID="StartDate"
runat="server"
AutoPostBack="true"
ontextchange="StartDate_TextChanged"
></asp:TextBox>
<asp:CalendarExtender
ID="CalendarExtender1"
TargetControlID="StartDate"
runat="server"
format="yyyy-MM-dd"/>
<td class="style8">
End Date:</td>
<td class="style9">
<asp:TextBox
ID="EndDate"
runat="server"
AutoPostBack="true"
ontextchange="EndDate_TextChanged"
></asp:TextBox>
<asp:CalendarExtender
ID="CalendarExtender2"
TargetControlID="EndDate"
runat="server"
format="yyyy-MM-dd"/>
</td>
<td class="style3">
</td>
<td class="style5">
<asp:Button ID="Export" runat="server" Text="Export" Width="145px"
style="text-align: center; font-weight: 700; margin-left: 6px" />
</td>
</tr>
<tr>
<td class="style4">
</td>
<td class="style6">
</td>
<td class="style7">
</td>
<td class="style8">
</td>
<td class="style9">
</td>
<td class="style3">
</td>
<td class="style5">
</td>
</tr>
<tr>
<td class="style4">
<asp:GridView ID="GridView1" runat="server" style="font-family: Verdana; font-size: x-small"
CellPadding="4" ForeColor="#333333" GridLines="None">
<AlternatingRowStyle BackColor="White" />
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>
</td>
<td class="style6">
</td>
<td class="style7">
</td>
<td class="style8">
</td>
<td class="style9">
</td>
<td class="style3">
</td>
<td class="style5">
</td>
</tr>
</table>
</form>
</body>
</html>