473,379 Members | 1,260 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

no postback

MA
Hi!

I have a database-driven web user control. On this control i have a grid
with a datatable inside, getting info from db. Lets say it looks like a
sheet in ms excel.
My problem is that every time I push a button (ex save), the page reloads.
This takes a while and feels like overkill when I only want to update one
cell on my page.
Is there a way to go around this? Lets say I push the save-button and only
one cell is updated.

Anyone who have a solution to this?

/Marre
Nov 16 '05 #1
5 1219
Did you try putting an if statement for Page.IsPostBack? Then you can
only update what you want on postback, and leave all the rest as it was,
only to be loaded on first page load.

--------------------------------
| Scott C. Reynolds |
| Tales from the SharpSide |
| http://www.scottcreynolds.com |
--------------------------------
MA wrote:
Hi!

I have a database-driven web user control. On this control i have a grid
with a datatable inside, getting info from db. Lets say it looks like a
sheet in ms excel.
My problem is that every time I push a button (ex save), the page reloads.
This takes a while and feels like overkill when I only want to update one
cell on my page.
Is there a way to go around this? Lets say I push the save-button and only
one cell is updated.

Anyone who have a solution to this?

/Marre

Nov 16 '05 #2
Marre,

The only way to get around this would be to have the javascript on the
client side issue a request in the event handler for the button click. This
would most likely require that you have security permissions to instantiate
an ActiveX control (most likely the XML HTTP component), which are not
normally enabled by default.

I believe this strategy is used in some places in .NET 2.0, but it is
not browser-independent, so I wouldn't say you can rely on it as a solution
unless you can be assured that only IE clients will be used, and the
appropriate security settings are in place.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"MA" <ne**@supremelink.se> wrote in message
news:2i************@uni-berlin.de...
Hi!

I have a database-driven web user control. On this control i have a grid
with a datatable inside, getting info from db. Lets say it looks like a
sheet in ms excel.
My problem is that every time I push a button (ex save), the page reloads.
This takes a while and feels like overkill when I only want to update one
cell on my page.
Is there a way to go around this? Lets say I push the save-button and only
one cell is updated.

Anyone who have a solution to this?

/Marre

Nov 16 '05 #3
MA
Hi!

Yes, I did that. I donīt want the postback at all, but it seems like itīs
something I have to live with ;)

/Marre

"Scott C. Reynolds" <sc***@scottcreynolds.com> wrote in message
news:en**************@TK2MSFTNGP11.phx.gbl...
Did you try putting an if statement for Page.IsPostBack? Then you can
only update what you want on postback, and leave all the rest as it was,
only to be loaded on first page load.

--------------------------------
| Scott C. Reynolds |
| Tales from the SharpSide |
| http://www.scottcreynolds.com |
--------------------------------
MA wrote:
Hi!

I have a database-driven web user control. On this control i have a grid
with a datatable inside, getting info from db. Lets say it looks like a
sheet in ms excel.
My problem is that every time I push a button (ex save), the page reloads. This takes a while and feels like overkill when I only want to update one cell on my page.
Is there a way to go around this? Lets say I push the save-button and only one cell is updated.

Anyone who have a solution to this?

/Marre

Nov 16 '05 #4
Hi Marre
one thing that you can do is to cache your control and make
only the save button to cause postback (set the rest controls
autopostback=false) .. hope that helps
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 16 '05 #5
Yeah, if the button causes data to go from the page to the database
there really isn't any way (that I know of) to avoid the round trip.
The best you could hope for is to minimize the amount of stuff that
happens during the trip.

--------------------------------
| Scott C. Reynolds |
| Tales from the SharpSide |
| http://www.scottcreynolds.com |
--------------------------------
MA wrote:
Hi!

Yes, I did that. I donīt want the postback at all, but it seems like itīs
something I have to live with ;)

/Marre

"Scott C. Reynolds" <sc***@scottcreynolds.com> wrote in message
news:en**************@TK2MSFTNGP11.phx.gbl...
Did you try putting an if statement for Page.IsPostBack? Then you can
only update what you want on postback, and leave all the rest as it was,
only to be loaded on first page load.

--------------------------------
| Scott C. Reynolds |
| Tales from the SharpSide |
| http://www.scottcreynolds.com |
--------------------------------
MA wrote:
Hi!

I have a database-driven web user control. On this control i have a grid
with a datatable inside, getting info from db. Lets say it looks like a
sheet in ms excel.
My problem is that every time I push a button (ex save), the page
reloads.
This takes a while and feels like overkill when I only want to update
one
cell on my page.
Is there a way to go around this? Lets say I push the save-button and
only
one cell is updated.

Anyone who have a solution to this?

/Marre


Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Matthew Louden | last post by:
I created simple ASP.NET web application to test how AutoPostBack property in a web control works. I set AutoPostBack property to be true of a web control. When I run the application, here's the...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
8
by: walesboy | last post by:
greetings - I have a btnSubmit button with a Handles btnSubmit.click which works great if all the user does is click that button. But, if the user ALSO changes a text box on the page (which...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
2
by: Wizzard | last post by:
I have a repeater with and imagebutton on a page useing VS2005 ASP.Net 2.0 <asp:Repeater ID="Repeater1" runat="server" > <ItemTemplate> <div> <asp:ImageButton ImageUrl="button.gif"...
11
by: antonyliu2002 | last post by:
I know that this has been asked and answered thousands of times. As a matter of fact, I know that I need to say If Not Page.IsPostBack Then 'Do something End If for things that needs to be...
2
by: Nathan Sokalski | last post by:
I have a DataList in which the ItemTemplate contains two Button controls that use EventBubbling. When I click either of them I receive the following error: Server Error in '/' Application....
7
by: Tony Girgenti | last post by:
Hello. I'm trying to undetrstand ASP.NET 2.0 and javascript. When i have a button and i click on it and i see the web broswer progress bar at the bottom do something, does that mean that there...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.