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
Kevin Ljung
NA
30
14.7k
Avoid page refresh on button click asp.net
Jul 12 2019 8:13 AM
Hi.
Im using a button like this:
<
asp:Button
ID
=
"btnShowAvailableReports"
class
=
"btnBasic"
OnClick
=
"btnShowAvailableReports_Click"
runat
=
"server"
Text
=
"View reports"
/>
and this button click event triggers a div placeholder which hold the available reports.
The problem is that this reloads the page and re-renders the basic information on the page.
If I then click the menu item where this information is it shows properly as it should - but I have to re-click the menu item to get back due to the page refresh.
I have tried:
- Add button property OnClientClick="return false;"
This blocks my onclick-event that I need.
- Use page header: <%@ Page Language="C#" MaintainScrollPositionOnPostBack="true" Title="Home" %>
This seems to do nothing at all.
Thankful for all help.
Cheers.
Reply
Answers (
1
)
this error returns when trying to oauth.
crystal reports from C# using data from oracle