A
Averell
Hi,
When an user tries to update a record in a gridview with a duplicate value,
there comes an error like:
"The changes you requested to the table were not successful because they
would create duplicate values in the index etc ..."
I tried to solve that with the errorPage like this:
<%@ Page Language="VB" CodeFile="mult.aspx.vb" Inherits="mult"
errorPage="err2.html" %>
and to set in web.config this:
<customErrors mode="On">
</customErrors>
This works, but is this the best way? I would like to do that for all pages
with global.asax.
I did this:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Dim ex As Exception
ex = Server.GetLastError()
Throw ex
End Sub
But of course, there must be more code. But here I'm stuck ...
Any help would be appreciated
Thanks
Averell
When an user tries to update a record in a gridview with a duplicate value,
there comes an error like:
"The changes you requested to the table were not successful because they
would create duplicate values in the index etc ..."
I tried to solve that with the errorPage like this:
<%@ Page Language="VB" CodeFile="mult.aspx.vb" Inherits="mult"
errorPage="err2.html" %>
and to set in web.config this:
<customErrors mode="On">
</customErrors>
This works, but is this the best way? I would like to do that for all pages
with global.asax.
I did this:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Dim ex As Exception
ex = Server.GetLastError()
Throw ex
End Sub
But of course, there must be more code. But here I'm stuck ...
Any help would be appreciated
Thanks
Averell