473,729 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question regarding AutoPostback dropdown list

Hi there,

I'm using VS.NET 2003, (.NET 1.1.4322) -
I've got dropdown list with about 10 items in it on a web page.
On 2 of the items i'd like the autopostback to occur, whereas if the user
selects the other items i dont want it to occur.

Is this possible?

thanks,
Paul

Feb 1 '06 #1
2 1156
Paul,

Set AutoPostBack to false and handle the client-side onchange event. In the
javascript event handler check what item is selected and, if a postback is
required, make a javascript call to myForm.submit() ;. If you need to pass
additional parameters to the server, for example to specify the reason for
the postback, you can do it in hidden <input> controls.

Eliyahu

"Milsnips" <mi******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi there,

I'm using VS.NET 2003, (.NET 1.1.4322) -
I've got dropdown list with about 10 items in it on a web page.
On 2 of the items i'd like the autopostback to occur, whereas if the user
selects the other items i dont want it to occur.

Is this possible?

thanks,
Paul

Feb 1 '06 #2
Great, thanks for you're help. i'll give that a try.

regards,
Paul
"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:u9******** ******@TK2MSFTN GP10.phx.gbl...
Paul,

Set AutoPostBack to false and handle the client-side onchange event. In
the javascript event handler check what item is selected and, if a
postback is required, make a javascript call to myForm.submit() ;. If you
need to pass additional parameters to the server, for example to specify
the reason for the postback, you can do it in hidden <input> controls.

Eliyahu

"Milsnips" <mi******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi there,

I'm using VS.NET 2003, (.NET 1.1.4322) -
I've got dropdown list with about 10 items in it on a web page.
On 2 of the items i'd like the autopostback to occur, whereas if the user
selects the other items i dont want it to occur.

Is this possible?

thanks,
Paul


Feb 1 '06 #3

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

Similar topics

2
1572
by: Miguel Dias Moura | last post by:
Hello, I have a Drop Down List with 3 options. I want to redirect to a new page when an options is selected. I don't want to use a button. The redirection should be fired when the option is selected. I have an ASP.net / VB page with a Drop Down List named "my select" as follows: <asp:DropDownList AutoPostBack="true" ID="myselect" runat="server">
4
3785
by: Christian Ista | last post by:
Hello, I have 2 questions : 1. On an ASP.NET page I have several controls (5 TextBox, 1 Dropdown and 1 button) Only the dropdown is AutoPostBack = true, the TextBox are SingleLine When I execute the page, I fill in the textbox, I change the dropdown selection, the page is reloaded no problem I see the textbox still fill in.
3
1575
by: Jon | last post by:
I am using cascading dropdowns, where the selection in one determines what fills another. In regular ASP I simply loaded a giant dataset into javascript array and when you clicked on one dropdown, it populated the others accordingly. In ASP.Net, I was looking for a way to do this without javascript. So, I made my form and put code in the SelectedIndexChanged event of the dropdown that populates the next dropdown. Of course to do this,...
2
1897
by: Wysiwyg | last post by:
I was hoping to get some opinions on the efficiency of various methods of reusing the same dropdown list data. Here is the situation: Multiple panels on maintenance pages with TAB menus across the top showing different panels. A DropDownList with a 50+ value/text entries exists on more than one panel but only one will be displayed at a time. Examples might be US states, countries, category codes, etc.
3
990
by: Patrick Olurotimi Ige | last post by:
I have DropDown List ... that populates some Data..But the DropDown does a postback that retrieves some other DropDown List with Data But i want to add Data to the Dropdpwn list they have selected.. The table i want to add to looks like this:- D_ID|AddID|AdddTypeID|Address 1 |1 |1 |Site 304 NICHOLSON ST FITZROY VIC3065 1 |2 |2 |Delivery 304 NICHOLSON ST FITZROY VIC 3065
0
1440
by: kaon | last post by:
Hi, Ive been looking for a way to capture an autopostback event of a dropdownlist in a datagrid control. the scenario is that, ive a datagrid, and there is a dropdownlist column in each of the row with each record (note the drop down dont only show when u edit a row, but it shows always for every row), when i change a value from the dropdown for any row of the grid, i want to get the row id (or the record id that i can by someway put in...
3
9289
by: indigator | last post by:
I am using ASP.NET 2.0. I have 2 dropdownlists in my page. One holds the list of all the countries and other holds the list of all States. When the user selects the country as United States, I want the second dropdownlist to show all the states in US, otherwise I want the state dropdown to be disabled. For this, I set the Autopostback property of country dropdown to true. I double-clicked on the selected index changed event in the...
0
1456
by: riley.derrick | last post by:
To all the ASP.NET 2.0 Gurus, I am having a bit of a problem. Here is the situation. I have a created a web form that does the following. Has 2 dropdown lists that are databound to a SQL Datasource. Has 2 calendar controls with 2 dropdowns (month/year) per Calendar. The calendars are edited/modified so that the user can choose a Month and a Year for a particular calendar and the calendar control updates and displays that particular month...
3
311
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a gridview with several template columns and a few command button columns, column 1 and 2 are dropdown boxes, column 3 is a checkbox and column 4 is a text box, followed by command button columns. These are all for data entry and although I am populating the dropdown list boxes with an objectdatasource so the user can provide a selection, I am not binding the gridview to anything. The command buttons again are for the user to be...
0
8763
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9284
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
9202
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
9148
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
6722
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
6022
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();...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2165
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.