473,698 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

avoiding postback

NH
Hi,

I have two dropdown lists in a web form. When you choose an entry in the
first list the code retrieves records from the database and displays them in
the second dropdownlist.

Is there a way of avoiding a postback with this by maybe retrieving all the
data at the start and then filtering what should be displayed on the second
dropdown list on the client side?

Thanks
N
Nov 19 '05 #1
2 1207
Sure this can be done, but it requires lots of javascript that you'd need
to write. The model with ASP.NET is a server side model, so most anything
that is dynamic and needs code to execute will go back to the server. If
this is not desired then, like I mentioned above, you'll need to build that
infrastructure yourself.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I have two dropdown lists in a web form. When you choose an entry in
the first list the code retrieves records from the database and
displays them in the second dropdownlist.

Is there a way of avoiding a postback with this by maybe retrieving
all the data at the start and then filtering what should be displayed
on the second dropdown list on the client side?

Thanks
N


Nov 19 '05 #2
NH
Thanks, thats pretty much what I thought. It would be nice if Microsoft had
some friendly client side code which would work easily with asp.net, I know
that certain things can be done but its just rather overly complicated.

"Brock Allen" wrote:
Sure this can be done, but it requires lots of javascript that you'd need
to write. The model with ASP.NET is a server side model, so most anything
that is dynamic and needs code to execute will go back to the server. If
this is not desired then, like I mentioned above, you'll need to build that
infrastructure yourself.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I have two dropdown lists in a web form. When you choose an entry in
the first list the code retrieves records from the database and
displays them in the second dropdownlist.

Is there a way of avoiding a postback with this by maybe retrieving
all the data at the start and then filtering what should be displayed
on the second dropdown list on the client side?

Thanks
N


Nov 19 '05 #3

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

Similar topics

2
4344
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 displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event raised in the 'Handle Postback Events' stage of the control execution life cycle (via the...
7
1772
by: Ramsi | last post by:
My development environment is ASP.Net 1.1. Clicked event of a button has lengthy procedure it will take 2 to 4 seconds to process the data. My question is, 1.. If the user clicks the button again, will the clicked event called again? 2.. If yes to the above question how to avoid these kinds of scenarios? Thanks for your suggestions. Ramsi
3
1207
by: RUSSELL MCGINNIS | last post by:
I have a web page which is periodically refreshing itself with data from the server. However I dont want this activity to counted towards the session's "activity counter" i.e. if a user does nothing on the page for 20 mins then I want the session to time out even though the page has been refreshing itself in the background. Any ideas?
8
11161
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 has it's own event and autopostback=true) before clicking submit then it fires the text box event but never fires the btnSubmit event. (I follow it in the trace). Surely both event handlers should be fired? Any hints on identifying what I
4
3406
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 RaiseCallbackEvent(string eventArgs) { // update the data object with the values currently on screen FormView1.UpdateItem(true); }
1
17040
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 control in my aspx page with two image buttons, one for an edit command, another a delete command. Here is a cut down code fragment. ...
11
14819
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 processed by the web server. I am still struggling to understand this postback logic, and hope that some kind gurus out there could help me clarify the confusion I have.
2
3919
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 well, so at times it is tempting just to port parts of it over mostly as-is. In fact, one MSDN article I read suggested using straight HTML wherever possible to make the app more efficient and less resource demanding. On one page there are 2...
6
14856
by: Brian Simmons | last post by:
Hi all, I come from a ColdFusion background, and the majority of the time, here's how we processed a page: 1) The Data entry page would have a submit button which would post to an action page 2) The action page would do the validation and database processing, if successful, the action page would <cflocation(similar to a Response.Redirect or Server.Transfer) to a display page.
0
8674
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9026
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2328
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.