Hello,
In aspx page, whic has a server button on it.
I don't want to reload the page after I press the button.
How can I do that ?
Thanks :) 6 912
In this instance your "reload" = a postback methinks, and I could be
wrong, but I don't think you can prevent it. The only way I could see
would be to use a client-side html button.
I'm assuming you have a If (ispostback = true) then .... block in your
page_load event?
Hi Eitan:
You can check the boolean property IsPostBack in your Page_Load event
handler. If IsPostBack is false - you are doing your initial page
load, else a control is posting back to raise an event.
Make sense?
--
Scott http://www.OdeToCode.com/blogs/scott/
On Mon, 6 Jun 2005 00:43:49 +0200, "Eitan M" <no****@nospam.com>
wrote: Hello, In aspx page, whic has a server button on it. I don't want to reload the page after I press the button.
How can I do that ?
Thanks :)
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:29********************************@4ax.com... Hi Eitan:
You can check the boolean property IsPostBack in your Page_Load event handler. If IsPostBack is false - you are doing your initial page load, else a control is posting back to raise an event.
Make sense?
--
I know the isPostBack,
and the : isPostBack is in the page_load event,
but I don't want even to go to the page_load event
(or just close the page before doing something).
Thanks :)
You could always use a regular <input> tag instead of a server side
button control - then do whatever processing you need with javascript.
--
Scott http://www.OdeToCode.com/blogs/scott/
On Mon, 6 Jun 2005 15:04:56 +0200, "Eitan M"
<no_spam_please@nospam_please.com> wrote: "Scott Allen" <sc***@nospam.odetocode.com> wrote in message news:29********************************@4ax.com.. . Hi Eitan:
You can check the boolean property IsPostBack in your Page_Load event handler. If IsPostBack is false - you are doing your initial page load, else a control is posting back to raise an event.
Make sense?
--
I know the isPostBack, and the : isPostBack is in the page_load event, but I don't want even to go to the page_load event (or just close the page before doing something).
Thanks :)
O.K.
Let's say, I have a click button, that on the click I want to close the
window (client side) , and also doing update to database.
Thanks :)
If you want to update the database you'll have to make some sort of
request to the server. If you really want to avoid Page_Load you could
use XMLHTTP or Ajax.net to push data to the server with some custom
JavaScript. I think this would be a much more difficult task than just
using a button event handler in your page that will fire after
Page_Load, though.
--
Scott http://www.OdeToCode.com/blogs/scott/
On Tue, 7 Jun 2005 18:57:15 +0200, "Eitan M" <no****@nospam.com>
wrote: O.K. Let's say, I have a click button, that on the click I want to close the window (client side) , and also doing update to database.
Thanks :) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: bminder |
last post by:
In the asp.net pages below, Common.vb has an overridable Page_Load sub. In
the consuming page, Two.aspx, the Page_Load sub is inherited, but for some
reason it (Overrides Sub Page_Load) executes...
|
by: DavidS |
last post by:
Have parent.aspx from which I open Driver.aspx form via button on parent.aspx. When I first open the modal dialog, the driver.aspx Page_Load function is called. After I close the dialog, then...
|
by: Itai |
last post by:
Background:
I have four Web Form pages with respective C# code behind files,
all in the same project:
localhost/vpath1
Page1.aspx
Page2.aspx
|
by: V. Jenks |
last post by:
I'm a little rusty having not touched .NET for 6 months and
I can't remember why Page_Load is happening twice in this code:
private void Page_Load(object sender, System.EventArgs e)
{...
|
by: tshad |
last post by:
Is there a way to do put Page_loads on a page?
I am trying to setup a Page_Load that just puts a persons name that is
logged on at the top of a page the first time a page is loaded.
In my...
|
by: Seraph |
last post by:
Again, I'm rather new here, so if I fail to follow any etiquette,
please forgive me and let me know what I've done wrong, but I think
this might interest quite a few people.
One of my colleaques...
|
by: Andy |
last post by:
Hi all,
I have a site with the following architecture:
Common.Web.dll - Contains a CommonPageBase class which inherits
System.Web.UI.Page
myadd.dll - Contains PageBase which inherits...
|
by: rockdale |
last post by:
Hi,
I have a masterpage and on the page_load event I Populate my mainmenu
from database.
I the page_load event of my content, I am trying to programmly select
the menuitem that represent...
|
by: fiefie.niles |
last post by:
I am using ASP.NET 2005 and I have a simple form. Page_Load calls a
sub mySub that does not do anything (for testing purposes). But,
Page_Load gets called twice.
On every single ASPX page in my...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |