I want to show msgbox after save data to database and not show msgbox when post back again after save data.
Now I use "RadAjaxManager1.ResponseScripts.Clear()" for clear msgbox .. but msgbox show alway after save data..
Pls help me ..
Page Load
Insert Data
Now I use "RadAjaxManager1.ResponseScripts.Clear()" for clear msgbox .. but msgbox show alway after save data..
Pls help me ..
Page Load
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then ConnectPreFix() ConnectUserGroup() CheckLevelGroup(gLevel) ..... Else RadAjaxManager1.ResponseScripts.Clear() End If End SubInsert Data
Sub InsertData() Dim Result As Boolean Try StrSql="..." Result = DbPortal.QueryExecuteNonQuery(StrSql) .... Catch ex As Exception LblError.Text = " InsertData :" & ex.Message PanelError.Visible = True Finally ShowMsg("Insert Data Complete !") PanelError.Visible = False End Try
End Sub
Show Msg
Sub ShowMsg(ByVal sMsg As String) RadAjaxManager1.ResponseScripts.Add("Sys.Application.add_load(function()" & Chr(13)& "" & Chr(10) & " {radalert('" & sMsg & "', 330, 210);})") End Sub