473,403 Members | 2,071 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,403 software developers and data experts.

ASP.NET 2.0: Are they going to fix HtmlSelect?

HtmlSelect has a method called OnServerChange that supposed to detect
whether the control (select) has changed on a postback.

This is not all that useful.

It should be like the asp.net control, DropDownList, that initiates a
postback when the option, AutoPostBack is set to true...so you can either
have it postback when the user changes it immediately or not do anything
when the user changes it.

Seems like a very easy thing to do..if you are going to set the
OnServerChange or OnChange, it should know whether or not you want a
postback OR if you want client side JavaScript to handle it.

Any comments from the ASP.NET team......
Nov 17 '05 #1
4 2641
nospam wrote:
HtmlSelect has a method called OnServerChange that supposed to detect
whether the control (select) has changed on a postback.

This is not all that useful.

It should be like the asp.net control, DropDownList, that initiates a
postback when the option, AutoPostBack is set to true...so you can either
have it postback when the user changes it immediately or not do anything
when the user changes it.

Seems like a very easy thing to do..if you are going to set the
OnServerChange or OnChange, it should know whether or not you want a
postback OR if you want client side JavaScript to handle it.

Any comments from the ASP.NET team......


I'm not on the ASP.NET team, but it seems to me that AutoPostBack is a
property that MS has provided to the appropriate Web Form Controls (like
(ListBox). The Html controls are provided to closely mirror the native
functionality of the standard HTML tags.

It seems to me that if you want AutoPostPack in a HtmlSelect-like
control, you should just use <asp:listbox> or <asp:dropdownlist>.

Or am I missing something?

--
mikeb

Nov 17 '05 #2
It has something to do with speed/performance, compatibility with doing
other javascript events. and the ability to an entire web page in all html
controls....

Html controls don't have to be completely rendered like the listbox or the
dropdownlist...performance
"mikeb" <ma************@mailnull.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
nospam wrote:
HtmlSelect has a method called OnServerChange that supposed to detect
whether the control (select) has changed on a postback.

This is not all that useful.

It should be like the asp.net control, DropDownList, that initiates a
postback when the option, AutoPostBack is set to true...so you can either have it postback when the user changes it immediately or not do anything
when the user changes it.

Seems like a very easy thing to do..if you are going to set the
OnServerChange or OnChange, it should know whether or not you want a
postback OR if you want client side JavaScript to handle it.

Any comments from the ASP.NET team......


I'm not on the ASP.NET team, but it seems to me that AutoPostBack is a
property that MS has provided to the appropriate Web Form Controls (like
(ListBox). The Html controls are provided to closely mirror the native
functionality of the standard HTML tags.

It seems to me that if you want AutoPostPack in a HtmlSelect-like
control, you should just use <asp:listbox> or <asp:dropdownlist>.

Or am I missing something?

--
mikeb

Nov 17 '05 #3
IN the HTML document that is rendered by the page, all of the ASP.Net
controls mentioned render the same type of HTML object in the page - a
select object. There are several different classes which you can work with.
These are just tools. If you want a certain functionality, you must pick the
tool that offers that functionality.

If you want more server-side functionality in a Control, you are necessarily
talking about a "heavier" control. Performance is certainly an issue. That
is why Microsoft provides several different "weights" of DropDown List
controls. Complaining that a Control doesn't work because it's the wrong
tool is pointless. In other words, you can't have it both ways. If you want
a Control to do more, you are talking about using a Control with more of a
footprint.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"nospam" <n@ntspam.com> wrote in message
news:uf**************@TK2MSFTNGP10.phx.gbl...
It has something to do with speed/performance, compatibility with doing
other javascript events. and the ability to an entire web page in all html
controls....

Html controls don't have to be completely rendered like the listbox or the
dropdownlist...performance
"mikeb" <ma************@mailnull.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
nospam wrote:
HtmlSelect has a method called OnServerChange that supposed to detect
whether the control (select) has changed on a postback.

This is not all that useful.

It should be like the asp.net control, DropDownList, that initiates a
postback when the option, AutoPostBack is set to true...so you can either have it postback when the user changes it immediately or not do anything when the user changes it.

Seems like a very easy thing to do..if you are going to set the
OnServerChange or OnChange, it should know whether or not you want a
postback OR if you want client side JavaScript to handle it.

Any comments from the ASP.NET team......


I'm not on the ASP.NET team, but it seems to me that AutoPostBack is a
property that MS has provided to the appropriate Web Form Controls (like
(ListBox). The Html controls are provided to closely mirror the native
functionality of the standard HTML tags.

It seems to me that if you want AutoPostPack in a HtmlSelect-like
control, you should just use <asp:listbox> or <asp:dropdownlist>.

Or am I missing something?

--
mikeb


Nov 17 '05 #4
Hey man, I don't need for you to tell me that the wrong tool is being used.

QUESTION #1
Why is it called the OnServerClick event in the first place?
OnServerClick should mean detect an event and goto the server to see what it
is....NOT hit SUBMIT, then detect if it's changed......see the
difference......

If anything, it currently should be called OnServerCHANGE....NOT
OnServerClick...

OnServerClick SHOULD be Event Detection(just like OnClick).....not detect
CHANGE after the SUBMIT button has happened.

It would be best to have BOTH.....OnServerChange and
OnServerClick....currently there is NO POSTBACK for HtmlSelect, and last
time I checked there are a lot of <SELECT> boxes that can immediately
trigger a postback or JavaScript event to do something that the user
wants...not already define what the event is going to do in the first place

Currently, you have to have the submit button to trigger this
OnServerClick....which doesn't correspond to the other Html Controls.

Say if someone wants a simple <select> control to postback immediatly to do
something other than see if it's changed....like change the data to a
table....should they have to press submit?

Performance and consistency and also more client side and server side
functionality within the same control is what is desired.....we want
performance all around.....Html whenever possible....Considering this is
ASP.NET 2.0...it needs to be possible.....

So what's the point in labeling the correct tool improperly in the first
place to be inconsistent with all the other controls?

These are just tools. If you want a certain functionality, you must pick the tool that offers that functionality.

WRONG!!! That's like saying to the customer...."if we don't have what you
want, pick someone else".
*************************************
A LITTLE HISTORY ON MVP's...............
*************************************
MVP's have that type of attitude toward a lot of people here.....These same
MVP's used that same "PICK-THE-RIGHT-TOOL argument for 100% POSTBACK
Pageflow as opposed to CROSSPOST to another page as well whenever someone
tried to post to another page..........Well guess what?....Who is going to
be oh-so completely wrong on 100% POSTBACK with ASP.NET 2.0? (that's why
every single web site made by and MVP sucks and guru web site SUCKS..that's
why .NET development is SLOW-GOING (Mister Bill said that)
Sorry Mr. MVP, but someone has to stick back in your place.


"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... IN the HTML document that is rendered by the page, all of the ASP.Net
controls mentioned render the same type of HTML object in the page - a
select object. There are several different classes which you can work with. These are just tools. If you want a certain functionality, you must pick the tool that offers that functionality.

If you want more server-side functionality in a Control, you are necessarily talking about a "heavier" control. Performance is certainly an issue. That
is why Microsoft provides several different "weights" of DropDown List
controls. Complaining that a Control doesn't work because it's the wrong
tool is pointless. In other words, you can't have it both ways. If you want a Control to do more, you are talking about using a Control with more of a
footprint.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"nospam" <n@ntspam.com> wrote in message
news:uf**************@TK2MSFTNGP10.phx.gbl...
It has something to do with speed/performance, compatibility with doing
other javascript events. and the ability to an entire web page in all html
controls....

Html controls don't have to be completely rendered like the listbox or the dropdownlist...performance
"mikeb" <ma************@mailnull.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
nospam wrote:
> HtmlSelect has a method called OnServerChange that supposed to detect > whether the control (select) has changed on a postback.
>
> This is not all that useful.
>
> It should be like the asp.net control, DropDownList, that initiates a > postback when the option, AutoPostBack is set to true...so you can

either
> have it postback when the user changes it immediately or not do

anything > when the user changes it.
>
> Seems like a very easy thing to do..if you are going to set the
> OnServerChange or OnChange, it should know whether or not you want a
> postback OR if you want client side JavaScript to handle it.
>
> Any comments from the ASP.NET team......
>
>

I'm not on the ASP.NET team, but it seems to me that AutoPostBack is a
property that MS has provided to the appropriate Web Form Controls (like (ListBox). The Html controls are provided to closely mirror the native functionality of the standard HTML tags.

It seems to me that if you want AutoPostPack in a HtmlSelect-like
control, you should just use <asp:listbox> or <asp:dropdownlist>.

Or am I missing something?

--
mikeb



Nov 17 '05 #5

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

Similar topics

1
by: Jonathan | last post by:
Hi everyone, I have a problem with a HtmlSelect control that I am loading dynamically in javascript. Here is my code: <asp:DropDownList id="MyDropDownList1" onChange="LoadContent(this);"...
6
by: BK | last post by:
I'm having a really strange problem with and HtmlSelect server control (listbox) and a RequiredFieldValidator that I am trying to use to make sure that someone has items in the listbox. The way...
0
by: Simon Johnson | last post by:
Dear all, I have a single htmlselect object in a usercontrol. I don't want to save the viewstate of that control because the number of elements in it is large. I do however, want to retain...
1
by: Suhail A, Salman | last post by:
Dear All, I placed a HtmlSelect control on a web page and set it to "Run at Server", the objective of this HtmlSelect control is that the client adds all his accounts to a text box, and...
2
by: Stephen Miller | last post by:
When I dynamically populate a HtmlSelect combo box, the Value property consistently fails to return the item selected, defaulting instead to the first item in the list. For example: Protected...
3
by: xenophon | last post by:
I created an HtmlSelect in my ASP.NET page template (setting runat="server" in its tag), double-clicked it in the Designer, and Visual Studio automagically made the declaration and Event Wireup and...
1
by: Ken | last post by:
I have an HTMLSelect server control that I am populating dynamically in the Page_Load event of my page. When I turn off VIEWSTATE, the HTMLSelect.Value property is blank when the page is posted...
3
by: Joe | last post by:
Hello All, I am populating an HtmlSelect control's Items property with four list items. The HtmlSelect control is contained in a user control which is dropped into a placeholder on the web form....
1
by: writebrent | last post by:
This is my code: HtmlSelect m = new HtmlSelect(); m.ID = "m1"; m.DataSource = dvBasic; //DataView created elsewhere m.DataTextField = "value"; m.DataValueField = "key"; m.Value = "2";...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.