TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Eyad Shahroury
NA
32
2.5k
ASPX.NET RadToolbarButton POSTBACK ISSUE
Apr 20 2020 2:16 PM
I have the following
1) ASPX FILE:
<%@ Page Language=
"VB"
AutoEventWireup=
"false"
CodeFile=
"lastOne.aspx.vb"
Inherits=
"Forms_lastOne"
%>
<!DOCTYPE html>
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head runat=
"server"
>
<title></title>
<script type=
"text/javascript"
>
function
OpenWindow(sID, sURL)
{
var
oManager = GetRadWindowManager();
oManager.open(sURL, sID);
return
false
;
//
var
oWnd = radopen(sURL, sID);
}
function
OnClientButtonClickingHandler(sender, eventArgs)
{
alert(
"aaaaaaaa"
)
//eventArgs.set_cancel(true);
}
</script>
</head>
<body>
<form id=
"form1"
runat=
"server"
>
<div>
<telerik:RadWindowManager EnableShadow=
"true"
Behaviors=
"Close, Move"
ID=
"m_oRadWindowManager"
runat=
"server"
Modal=
"true"
Skin=
"Windows7"
>
<Windows>
<telerik:RadWindow ID=
"m_oEditLocDialog"
VisibleOnPageLoad=
"false"
Title=
"Edit Location"
VisibleStatusbar=
"false"
NavigateUrl=
"~/Forms/Exports/ExportGrid.aspx"
runat=
"server"
Modal=
"true"
Width=
"550"
Height=
"500"
>
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<telerik:RadAjaxPanel runat=
"server"
>
<telerik:RadScriptManager ID=
"RadScriptManager1"
runat=
"server"
/>
<telerik:RadButton ID=
"m_oEditBtn"
Text=
"EditBtn"
runat=
"server"
OnClick=
"OpenWindow"
>
</telerik:RadButton>
<telerik:RadToolBar ID=
"m_oOverviewToolbar"
runat=
"server"
Width=
"100%"
EnableRoundedCorners=
"True"
EnableShadows=
"True"
OnButtonClick=
"m_oOverviewToolbar_ButtonClick"
>
<Items>
<telerik:RadToolBarButton runat=
"server"
Text=
"OpenRadWindow"
CommandName=
"Edit"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton ID=
"i1"
runat=
"server"
CommandName=
"View"
Text=
"ShowMsg"
PostBack=
"false"
>
</telerik:RadToolBarButton>
</Items>
</telerik:RadToolBar>
</telerik:RadAjaxPanel>
</div>
</form>
</body>
</html>
2) VB CODE ( Behind Code)
Imports
Telerik.Web.UIPartial
Class
Forms_lastOne
Inherits
System.Web.UI.Page
Protected
Sub
OpenWindow(sender
As
Object
, e
As
EventArgs)
OpenWindow(
Me
, m_oEditLocDialog,
Nothing
)
End
Sub
Protected
Sub
OpenWindow(oParentCtrl
As
Control, oWindow
As
RadWindow, sURL
As
String
)
RadScriptManager.RegisterStartupScript(oParentCtrl, oParentCtrl.
GetType
(),
"openWnd"
,
String
.Format(
"OpenWindow('{0}', '{1}');"
, oWindow.ID, sURL),
True
)
End
Sub
Protected
Sub
m_oOverviewToolbar_ButtonClick(sender
As
Object
, e
As
RadToolBarEventArgs)
Handles
m_oOverviewToolbar.ButtonClick
Dim
oBtn
As
RadToolBarButton = e.Item
If
(oBtn.CommandName =
"Edit"
)
Then
OpenWindow(
Me
, m_oEditLocDialog,
Nothing
)
ElseIf
(oBtn.CommandName =
"View"
)
Then
MsgBox(
"OK"
)
End
If
End
Sub
End
Class
Problem:
When I press in toolbarbutton (view button) its shown message "OK" but when I reload or refresh the page the same message "OK" showing again .
SO how can I prevent any action after reloading or refreshing the page and when I press on Toolbarbutton
Reply
Answers (
1
)
How to update existing table schema in EF migration?
Alert message with , separated for Jquery tag