 |
| ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 3rd, 2011, 09:24 AM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 37
Thanks: 8
Thanked 0 Times in 0 Posts
|
|
Javascript functions from Gridview RowCommand Event
Hi Imar
I've tried the suggestion of RegisterStartupScript
[CODE] If (e.CommandName = "Cancel") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandArgument)
' Retrieve the row that contains the button from the Rows collection.
Dim row As GridViewRow = GridViewReservations.Rows(index)
PublicationID = row.Cells(0).Text
' Retrieve the row that contains the button from the Rows collection.
Dim rowTwo As GridViewRow = GridViewReservations.Rows(index)
Status = rowTwo.Cells(2).Text
If Status = "Out on Loan\Reserved for Loan" Then
Using myLiteratureCatalogue As New Model1.Literature_Cataloguing_SystemEntities
Dim reservationStatus = (From publication In myLiteratureCatalogue.Publications Where publication.PublicationID = (PublicationID) Select publication).First()
' Change the status of the publication.
reservationStatus.ReservationID = Nothing
reservationStatus.StatusID = (2)
myLiteratureCatalogue.SaveChanges()
End Using
'System.Threading.Thread.Sleep(5000)
Call ReservationCancellationNotification()[/CODE]
Code:
Protected Sub ReservationCancellationNotification()
' Define the name and type of the client scripts on the page.
Dim csname1 As [String] = "PopupScript"
Dim cstype As Type = Me.[GetType]()
' Get a ClientScriptManager reference from the Page class.
Dim cs As ClientScriptManager = Page.ClientScript
' Check to see if the startup script is already registered.
If Not cs.IsStartupScriptRegistered(cstype, csname1) Then
Dim cstext1 As New StringBuilder()
cstext1.Append("<script type=text/javascript> alert('This reservation has now been cancelled') </")
cstext1.Append("script>")
cs.RegisterStartupScript(cstype, csname1, cstext1.ToString())
End If
End Sub
This does exactly as it says on the tin so to speak but for some reason my call for the 'ReservationCancellationNotification sub' never goes through. I know the procedure you suggested works because I've also tried calling it at the page load event which goes through as intended.
When I hit the 'Cancel' button field in my gridview, the gridview never refreshs to show the updated gridview, i.e. without the cancelled record. This was the reason I included the response.redirect to refresh the gridview?
Do you have any suggestions Imar?
|
|

May 3rd, 2011, 11:47 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Are you sure your command handler gets called? E.g. when you debug the code, do you see it hit your sub?
Imar
|
|

May 3rd, 2011, 12:43 PM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 37
Thanks: 8
Thanked 0 Times in 0 Posts
|
|
Debug Error
Hi Imar
I get the following error when I debug the affected page. Does this mean it can't find the JScript plug-in?
Quote:
|
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorExceptio n: The GridView 'GridViewReservations' fired event RowCancelingEdit which wasn't handled.
|
HTML Code:
<%@ Page Title="Shap Library Resources - User Account Information " Language="VB" MasterPageFile="~/MasterPages/Frontend.master" AutoEventWireup="false" CodeFile="MyAccountDefault.aspx.vb" Inherits="UsersPages_UserDefault" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cpMainContent" Runat="Server">
<script type="text/javascript">
function ReservationCancelled() {
alert("This reservation has now been cancelled");
}
</script>
<script type="text/javascript">
function LoanAvailable() {
alert("You may now collect the publication from the Central Business Unit team");
}
</script>
<script type="text/javascript">
function LoanNotAvailable() {
alert("This publication is not currently available for loan");
}
</script>
<div class="Position">
<asp:UpdatePanel ID="UpdatePanel" runat="server">
<ContentTemplate>
<table style="width: 100%">
<tr>
<td style="text-align: center">
<asp:LoginName ID="LoginName" runat="server" FormatString="Welcome back {0}" />
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<strong>Office Base</strong></td>
</tr>
<tr>
<td>
<asp:DetailsView ID="UserDetailsView" runat="server" CellPadding="4"
FieldHeaderStyle-Width="250px" ForeColor="#333333" GridLines="None"
Height="50px" Width="752px" AutoGenerateRows="False">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
<EditRowStyle BackColor="#999999" />
<FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
<Fields>
<asp:BoundField DataField="ServiceDescription" HeaderText="Service Description"
SortExpression="ServiceDescription" />
<asp:BoundField DataField="AddressLine1" HeaderText="Address Line 1"
SortExpression="AddressLine1" />
<asp:BoundField DataField="AddressLine2" HeaderText="Address Line 2"
SortExpression="AddressLine2" />
<asp:BoundField DataField="TownDescription" HeaderText="Town "
SortExpression="TownDescription" />
<asp:BoundField DataField="AddressPostcode" HeaderText="Postcode"
SortExpression="AddressPostcode" />
<asp:BoundField DataField="TelephoneNumber"
HeaderText="Service Telephone Number" SortExpression="TelephoneNumber" />
</Fields>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
</asp:DetailsView>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<asp:Label ID="LabelNullReservations" runat="server" CssClass="Response" Text="You currently have no publication reservations!" Visible="False" />
<asp:GridView ID="GridViewReservations" runat="server" AllowPaging="True"
AutoGenerateColumns="False" CellPadding="4"
Font-Names="tahoma" ForeColor="#333333" GridLines="None" Width="751px"
HorizontalAlign="Right">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:BoundField DataField="PublicationID" ItemStyle-Width="60px" HeaderText="ID" InsertVisible="False" SortExpression="PublicationID" >
<ItemStyle Width="60px" />
</asp:BoundField>
<asp:BoundField DataField="Title" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="300px" HeaderText="Publication Title" SortExpression="Title" >
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="StatusDescription" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Center" HeaderText="Status"
SortExpression="StatusDescription" >
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:ButtonField ButtonType="Button" ItemStyle-HorizontalAlign="Right" ControlStyle-Width="80px" ControlStyle-CssClass="Button" CommandName="Loan" Text="Loan" />
<asp:ButtonField ButtonType="Button" ItemStyle-HorizontalAlign="Right" ControlStyle-Width="80px" ControlStyle-CssClass="Button" CommandName="Cancel" Text="Cancel" />
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<asp:Label ID="LabelNullLoans" runat="server" CssClass="Response" Text="You currently have no publication loans!" Visible="False" />
<asp:GridView ID="GridViewLoans" runat="server" AllowPaging="True"
AutoGenerateColumns="False" CellPadding="4" Font-Names="tahoma"
ForeColor="#333333" GridLines="None" Width="751px">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:BoundField DataField="Title" HeaderText="Publication Title" />
<asp:BoundField DataField="EndLoanDate" DataFormatString="{0:dd/MM/yyyy}"
ItemStyle-Width="150px" HeaderText="Return Due Date"
ItemStyle-HorizontalAlign="Center" >
<ItemStyle HorizontalAlign="Center" Width="150px" />
</asp:BoundField>
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<asp:Button ID="ChangeAccountPasswordButton" runat="server" CssClass="Button"
PostBackUrl="~/UsersPages/ChangePassword.aspx" Text="Change Account Password"
Width="200px" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
Code:
Imports Model1.Literature_Cataloguing_SystemEntities
Imports System.IO
Imports System.Net.Mail
Imports System.Data.SqlClient
Partial Class UsersPages_UserDefault
Inherits System.Web.UI.Page
Dim currentUser As String = Membership.GetUser().UserName
Dim PublicationID As Integer
Dim PubTitle As Integer
Dim Status As String
Dim ExistingUser As MembershipUser = Membership.GetUser(currentUser)
Dim UserId As Guid = CType(ExistingUser.ProviderUserKey, Guid)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Call GetOfficeDetails()
Call GetReservationDetails()
Call GetLoanDetails()
If GridViewReservations.Rows.Count = 0 Then
LabelNullReservations.Visible = True
End If
If GridViewLoans.Rows.Count = 0 Then
LabelNullLoans.Visible = True
End If
End Sub
Protected Sub GetOfficeDetails()
Using myLiteratureCatalogue As New Model1.Literature_Cataloguing_SystemEntities
Dim allOfficeDetails = From aspnet_Users In myLiteratureCatalogue.aspnet_Users
From service In myLiteratureCatalogue.Services
From town In myLiteratureCatalogue.Towns()
Where aspnet_Users.ServiceID = service.ServiceID
Where service.TownID = town.TownID
Where aspnet_Users.UserId = (UserId)
Select service.ServiceDescription, service.AddressLine1, service.AddressLine2, town.TownDescription, service.AddressPostcode, service.TelephoneNumber
UserDetailsView.DataSource = allOfficeDetails
UserDetailsView.DataBind()
End Using
End Sub
Protected Sub GetReservationDetails()
Using myLiteratureCatalogue As New Model1.Literature_Cataloguing_SystemEntities
Dim allReservationsDetails = From publication In myLiteratureCatalogue.Publications
From status In myLiteratureCatalogue.Status
From loan In myLiteratureCatalogue.Loans
Where publication.StatusID = status.StatusID
Where publication.StatusID = (3) Or (4)
Where publication.ReservationID = (UserId)
Select publication.PublicationID, publication.Title, status.StatusDescription
GridViewReservations.DataSource = allReservationsDetails
GridViewReservations.DataBind()
End Using
End Sub
Protected Sub GetLoanDetails()
Using myLiteratureCatalogue As New Model1.Literature_Cataloguing_SystemEntities
Dim allLoanDetails = From loan In myLiteratureCatalogue.Loans
From publication In myLiteratureCatalogue.Publications
From status In myLiteratureCatalogue.Status
Where loan.PublicationID = publication.PublicationID
Where publication.StatusID = status.StatusID
Where status.StatusID = (2) Or (4)
Where loan.UserId = (UserId)
Select publication.Title, loan.EndLoanDate
GridViewLoans.DataSource = allLoanDetails
GridViewLoans.DataBind()
End Using
End Sub
Protected Sub UserConfirmation()
Dim User As String = Membership.GetUser().UserName
Dim Email As String = Membership.GetUser().Email
Dim fileName As String = Server.MapPath("~/App_Data/LoanVerification.txt")
Dim mailBody As String = File.ReadAllText(fileName)
mailBody = mailBody.Replace("<%UserName%>", User)
mailBody = mailBody.Replace("<%PublicationTitle%>", PubTitle)
Dim myMessage As MailMessage = New MailMessage()
myMessage.Subject = "User Resource Loan Request"
myMessage.Body = mailBody
myMessage.To.Add(New MailAddress(Email))
Dim mysmtpClient As SmtpClient = New SmtpClient()
mysmtpClient.Send(myMessage)
End Sub
Protected Sub CBULoanConfirmation()
Dim User As String = Membership.GetUser().UserName
Dim fileName As String = Server.MapPath("~/App_Data/CBUTeamLoanVerification.txt")
Dim mailBody As String = File.ReadAllText(fileName)
mailBody = mailBody.Replace("<%UserName%>", User)
mailBody = mailBody.Replace("<%PublicationTitle%>", PubTitle)
Dim myMessage As MailMessage = New MailMessage()
myMessage.Subject = "Loan request from library resource web site"
myMessage.Body = mailBody
myMessage.To.Add(New MailAddress("[email protected]"))
Dim mysmtpClient As SmtpClient = New SmtpClient()
mysmtpClient.Send(myMessage)
End Sub
Protected Sub UpdateDatabase()
Dim ExistingUser As MembershipUser = Membership.GetUser(currentUser)
Dim UserId As Guid = CType(ExistingUser.ProviderUserKey, Guid)
Dim SDate As Date = Now()
Dim FDate As Date = SDate.AddDays(28)
Dim connection As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("LiteratureCataloguingConnectionString").ConnectionString)
Dim sql As String = "INSERT INTO Loan (PublicationID, UserId, StartLoanDate, EndLoanDate, ThirdDayNotification, FifthDayNotification, FifteenthDayNotification, ThirtiethDayNotification) VALUES (@PublicationID, @UserId, @StartLoanDate, @EndLoanDate, @ThirdDayNotification, @FifthDayNotification, @FifteenthDayNotification, @ThirtiethDayNotification)"
Dim command As SqlCommand = New SqlCommand(sql, connection)
command.Parameters.AddWithValue("@PublicationID", PublicationID)
command.Parameters.AddWithValue("@UserId", UserId)
command.Parameters.AddWithValue("@StartLoanDate", SDate)
command.Parameters.AddWithValue("@EndLoanDate", FDate)
command.Parameters.AddWithValue("@ThirdDayNotification", (0))
command.Parameters.AddWithValue("@FifthDayNotification", (0))
command.Parameters.AddWithValue("@FifteenthDayNotification", (0))
command.Parameters.AddWithValue("@ThirtiethDayNotification", (0))
command.Connection.Open()
command.ExecuteNonQuery()
command.Connection.Close()
Using myLiteratureCatalogue As New Model1.Literature_Cataloguing_SystemEntities
Dim existingStatus = (From publication In myLiteratureCatalogue.Publications Where publication.PublicationID = (PublicationID) Select publication).First()
' Change the status of the publication.
existingStatus.StatusID = (2)
myLiteratureCatalogue.SaveChanges()
End Using
End Sub
Protected Sub GridViewReservations_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridViewReservations.RowCommand
If (e.CommandName = "Cancel") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandArgument)
' Retrieve the row that contains the button from the Rows collection.
Dim row As GridViewRow = GridViewReservations.Rows(index)
PublicationID = row.Cells(0).Text
' Retrieve the row that contains the button from the Rows collection.
Dim rowTwo As GridViewRow = GridViewReservations.Rows(index)
Status = rowTwo.Cells(2).Text
If Status = "Out on Loan\Reserved for Loan" Then
Using myLiteratureCatalogue As New Model1.Literature_Cataloguing_SystemEntities
Dim reservationStatus = (From publication In myLiteratureCatalogue.Publications Where publication.PublicationID = (PublicationID) Select publication).First()
' Change the status of the publication.
reservationStatus.ReservationID = Nothing
reservationStatus.StatusID = (2)
myLiteratureCatalogue.SaveChanges()
End Using
'System.Threading.Thread.Sleep(5000)
Call ReservationCancellationNotification()
ElseIf Status = "Reserved for Loan" Then
Using myLiteratureCatalogue As New Model1.Literature_Cataloguing_SystemEntities
Dim reservationStatus = (From publication In myLiteratureCatalogue.Publications Where publication.PublicationID = (PublicationID) Select publication).First()
' Change the status of the publication.
reservationStatus.ReservationID = Nothing
reservationStatus.StatusID = (1)
myLiteratureCatalogue.SaveChanges()
End Using
'System.Threading.Thread.Sleep(5000)
'Response.Redirect(Request.RawUrl)
Call ReservationCancellationNotification()
End If
End If
If (e.CommandName = "Loan") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandArgument)
' Retrieve the row that contains the button from the Rows collection.
Dim row As GridViewRow = GridViewReservations.Rows(index)
PublicationID = row.Cells(0).Text
' Retrieve the row that contains the button from the Rows collection.
Dim rowOne As GridViewRow = GridViewReservations.Rows(index)
PubTitle = rowOne.Cells(1).Text
' Retrieve the row that contains the button from the Rows collection.
Dim rowTwo As GridViewRow = GridViewReservations.Rows(index)
Status = rowTwo.Cells(2).Text
If Status = "Available for Loan" Then
Call UpdateDatabase()
Call UserConfirmation()
Call CBULoanConfirmation()
Using myLiteratureCatalogue As New Model1.Literature_Cataloguing_SystemEntities
Dim reservationStatus = (From publication In myLiteratureCatalogue.Publications Where publication.PublicationID = (PublicationID) Select publication).First()
' Change the status of the publication.
reservationStatus.ReservationID = Nothing
reservationStatus.StatusID = (2)
myLiteratureCatalogue.SaveChanges()
End Using
System.Threading.Thread.Sleep(5000)
Response.Redirect(Request.RawUrl)
ElseIf Status = "Out on Loan\Reserved for Loan" Or "Out on Loan" Or "Reserved for Loan" Then
System.Threading.Thread.Sleep(5000)
Response.Redirect(Request.RawUrl)
Stop
End If
End If
End Sub
Protected Sub ReservationCancellationNotification()
' Define the name and type of the client scripts on the page.
Dim csname1 As [String] = "PopupScript"
Dim cstype As Type = Me.[GetType]()
' Get a ClientScriptManager reference from the Page class.
Dim cs As ClientScriptManager = Page.ClientScript
' Check to see if the startup script is already registered.
If Not cs.IsStartupScriptRegistered(cstype, csname1) Then
Dim cstext1 As New StringBuilder()
cstext1.Append("<script type=text/javascript> alert('This reservation has now been cancelled') </")
cstext1.Append("script>")
cs.RegisterStartupScript(cstype, csname1, cstext1.ToString())
End If
End Sub
End Class
|
|

May 3rd, 2011, 12:43 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
BTW, are you running this from within an UpdatePanel?
Imar
|
|

May 3rd, 2011, 12:47 PM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 37
Thanks: 8
Thanked 0 Times in 0 Posts
|
|
Update Panel
Hi Imar
Yes its inside an update panel? Is that a no no for this functionality?
|
|

May 3rd, 2011, 01:00 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
Is that a no no for this functionality?
|
No, but it means you need to call the register script differently For more details:
http://developers.de/blogs/damir_dob...3F002100_.aspx
http://www.google.com/#hl=en&sugexp=...pt+Updatepanel
Then replace the code with something like this (untested):
Code:
Protected Sub ReservationCancellationNotification()
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "PopupScript", "alert('This reservation has now been cancelled.')", True)
End Sub
A few remarks:
1. Call is no longer needed. It was in Classic ASP, but now it serves no purpose.
2. When assigning script in a literal, using "<scr" & "ipt>" is no longer needed. It was in classic ASP as it would close the opening server side script tag.
3. Dotting into object references is no longer that expensive. E.g.:
Code:
Page.ClientScript.RegisterStartupScript(...)
is cleaner IMO than:
Code:
Dim cs As ClientScriptManager = Page.ClientScript
cs.RegisterStartupScript(...)
4. RegisterStartupScript has an overload that accepts a bool (used in my example) that automatically adds the necessary script tags for you.
There are some other recommendations I could make, but this should keep you busy for a while ;-)
Cheers,
Imar
|
|

May 3rd, 2011, 01:00 PM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 37
Thanks: 8
Thanked 0 Times in 0 Posts
|
|
Error Message
Since taking off the Update Panel I get the error code as shown below:
Server Error in '/' Application.
________________________________________
The GridView 'GridViewReservations' fired event RowCancelingEdit which wasn't handled.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The GridView 'GridViewReservations' fired event RowCancelingEdit which wasn't handled.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): The GridView 'GridViewReservations' fired event RowCancelingEdit which wasn't handled.]
System.Web.UI.WebControls.GridView.OnRowCancelingE dit(GridViewCancelEditEventArgs e) +279
System.Web.UI.WebControls.GridView.HandleCancel(In t32 rowIndex) +67
System.Web.UI.WebControls.GridView.HandleEvent(Eve ntArgs e, Boolean causesValidation, String validationGroup) +973
System.Web.UI.WebControls.GridView.RaisePostBackEv ent(String eventArgument) +211
System.Web.UI.WebControls.GridView.System.Web.UI.I PostBackEventHandler.RaisePostBackEvent(String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +172
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5348
|
|

May 3rd, 2011, 01:03 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
For that error, see:
http://www.google.com/#q=%22event%20...t%20handled%22
Also, you may need to call DataBind on your GridView after you canceled the reservation to rebind the Grid.
Cheers,
Imar
|
|

May 3rd, 2011, 01:06 PM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 37
Thanks: 8
Thanked 0 Times in 0 Posts
|
|
Dead Link
Hi Imar
can you repost this http://www.google.com/#q=%22event%20...t%20handled%22 as the link is just direct to Google and no actual search reference?
Thank you for all your help its much appreciated!
Phil
|
|

May 3rd, 2011, 01:25 PM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 37
Thanks: 8
Thanked 0 Times in 0 Posts
|
|
IT WORKS!!!!
Hi Imar
THANK YOU LOADS!!! It finally works I've been pulling my hair out for days trying to get this to work and now it finally does!
I glad this resource is available to people like me who are just starting to venture into the world of ASP development without it we would all be stumped, well I know I would!
Thanks once again!
Phil    
|
|
 |