Hi<BR>I would like the script below to validate a form basing on whether a <BR><BR>database update was successful or not. It validates items selected in a <BR><BR>dropdownlist and the form is valid if the update is successful. Its not <BR><BR>working, what am I doing wrong? <BR> &#060;script runat="server"&#062; <BR> void serverSelectsegment(object source, <BR><BR>ServerValidateEventArgs args) <BR> { <BR> try <BR> { <BR> args.IsValid = <BR><BR>(cmdGoldupdate.Parameters["@RETURN_VALUE"].Value == "1" ); <BR> } <BR><BR> catch <BR> { <BR> args.IsValid = false; <BR> } <BR> } <BR> &#060;/script&#062; <BR><BR>This is the stored procedure that does the update <BR>CREATE PROCEDURE dbo.sp_Goldupdate <BR>( <BR> @timer datetime, <BR> @org nvarchar(50), <BR> @message nvarchar(240), <BR> @url nvarchar(50), <BR> @email nvarchar(50) <BR><BR>) <BR>AS <BR><BR><BR><BR> SET NOCOUNT ON; <BR><BR>DECLARE @RETURN_VALUE int <BR><BR>BEGIN TRAN <BR><BR>UPDATE Gold SET org = @org, message = @message, url = @url, email = <BR><BR>@email WHERE (timer = @timer) AND ( org IS NULL) <BR><BR><BR><BR> SELECT @RETURN_VALUE = @@Error <BR><BR> IF @RETURN_VALUE != 0 <BR> BEGIN <BR> ROLLBACK TRAN <BR> RETURN(1) <BR> END <BR> ELSE <BR> BEGIN <BR> COMMIT TRAN <BR> RETURN(0) <BR> END <BR>GO <BR><BR>PS: Do you by any chance know how I can do the above programatically <BR><BR>i.e. without using scripts in html, but having code in the source file?