View Single Post
  #4 (permalink)  
Old December 29th, 2008, 09:03 AM
jn148 jn148 is offline
Authorized User
 
Join Date: Aug 2008
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Yeah... never mind! ;)

Forgot the:
Imports System.Data.SqlClient
at the top of my .vb codebehind - works like a champ now!


Even added a few other 'features' for my own use:
Code:
ProtectedSub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load
Message.Text = "<font color=black>Edit Existing Categories...</font>"
EndSub
 
 
ProtectedSub dsCategories_Deleted(ByVal sender AsObject, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles dsCategories.Deleted
If e.Exception IsNotNothingAndAlsoTypeOf (e.Exception) Is SqlException Then
Dim myException As SqlException = CType(e.Exception, SqlException)
If myException.Number = 547 Then
Message.Text = "Sorry, you cannot delete this Category because " & _
"it has associated plans that you need to delete or " & _
"reassign first"
e.ExceptionHandled = True
EndIf
Else
Message.Text = "Category deleted..."
EndIf
EndSub
 
 
ProtectedSub GridView1_RowUpdated(ByVal sender AsObject, ByVal e As System.Web.UI.WebControls.GridViewUpdatedEventArgs) Handles GridView1.RowUpdated
Message.Text = "Category updated..."
EndSub

Thanks again Imar!!
Reply With Quote