473,544 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HtmlSelect and RequiredFieldVa lidator

BK
I'm having a really strange problem with and HtmlSelect server control
(listbox) and a RequiredFieldVa lidator that I am trying to use to make sure
that someone has items in the listbox.

The way that the HtmlSelect is populated is via a combination of client-side
javascript and another aspx page (launched by the javascript).

Anyway, everything seems to work just fine in terms of populating the
HtmlSelect. However, when I postback the form, the RequiredFieldVa lidator
always thinks that there is nothing in the HtmlSelect and fails validation
(I am only using server-side validation, by the way). I have the
ControlToValida te and all those things hooked up properly. Is there some
trick to setting the RequiredFieldVa lidator for an HtmlSelect control? Some
property that I am not setting?? I suspect that there is some small setting
that I am missing, but I have spent way too much time on this to keep
struggling.

Any help is appreciated,
Thanks
Jul 21 '05 #1
6 2136
I wouldn't expect server-side validation to work on client-side added items.

Take a look at: http://openmymind.net/FAQ.aspx?documentId=1

but the quick answer is that when you add items in javascript, they aren't
added to the viewstate which means they won't be recreated on
postback...expl ains why your htmlselect is empty...

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:uM******** *****@tk2msftng p13.phx.gbl...
I'm having a really strange problem with and HtmlSelect server control
(listbox) and a RequiredFieldVa lidator that I am trying to use to make
sure
that someone has items in the listbox.

The way that the HtmlSelect is populated is via a combination of
client-side
javascript and another aspx page (launched by the javascript).

Anyway, everything seems to work just fine in terms of populating the
HtmlSelect. However, when I postback the form, the RequiredFieldVa lidator
always thinks that there is nothing in the HtmlSelect and fails validation
(I am only using server-side validation, by the way). I have the
ControlToValida te and all those things hooked up properly. Is there some
trick to setting the RequiredFieldVa lidator for an HtmlSelect control?
Some
property that I am not setting?? I suspect that there is some small
setting
that I am missing, but I have spent way too much time on this to keep
struggling.

Any help is appreciated,
Thanks

Jul 21 '05 #2
BK
OK, this sort of makes sense to me. But, all the documentation that I have
read says that the RequiredFieldVa lidator works with an HtmlSelect server
control. I guess what you are saying is that the items need to be added
server-side for this to work?

Also, if this is the case, then is there a way to add them to the viewstate
in the described scenario or will I have to do some kind of convoluted
CustomValidatio n where I check the Request collection? Based upon the FAQ
below, I am assuming that converting to web controls wouldn't solve the
problem either - this seems to be a client vs server side issue with regard
to how the validation works.

Brian

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uP******** ******@TK2MSFTN GP14.phx.gbl...
I wouldn't expect server-side validation to work on client-side added items.
Take a look at: http://openmymind.net/FAQ.aspx?documentId=1

but the quick answer is that when you add items in javascript, they aren't
added to the viewstate which means they won't be recreated on
postback...expl ains why your htmlselect is empty...

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:uM******** *****@tk2msftng p13.phx.gbl...
I'm having a really strange problem with and HtmlSelect server control
(listbox) and a RequiredFieldVa lidator that I am trying to use to make
sure
that someone has items in the listbox.

The way that the HtmlSelect is populated is via a combination of
client-side
javascript and another aspx page (launched by the javascript).

Anyway, everything seems to work just fine in terms of populating the
HtmlSelect. However, when I postback the form, the RequiredFieldVa lidator always thinks that there is nothing in the HtmlSelect and fails validation (I am only using server-side validation, by the way). I have the
ControlToValida te and all those things hooked up properly. Is there some
trick to setting the RequiredFieldVa lidator for an HtmlSelect control?
Some
property that I am not setting?? I suspect that there is some small
setting
that I am missing, but I have spent way too much time on this to keep
struggling.

Any help is appreciated,
Thanks


Jul 21 '05 #3
You are pretty much right about everything. Though I would expect the
client-side validation to still work (not necessarily ideal since it only
works in IE...)

-items need to be added server-side
-going to dropdownlist (server control) wouldn't change anything
-you'll need to write your own validator and use request.form

Cheers,
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:O3******** ********@TK2MSF TNGP09.phx.gbl. ..
OK, this sort of makes sense to me. But, all the documentation that I have
read says that the RequiredFieldVa lidator works with an HtmlSelect server
control. I guess what you are saying is that the items need to be added
server-side for this to work?

Also, if this is the case, then is there a way to add them to the
viewstate
in the described scenario or will I have to do some kind of convoluted
CustomValidatio n where I check the Request collection? Based upon the FAQ
below, I am assuming that converting to web controls wouldn't solve the
problem either - this seems to be a client vs server side issue with
regard
to how the validation works.

Brian

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uP******** ******@TK2MSFTN GP14.phx.gbl...
I wouldn't expect server-side validation to work on client-side added

items.

Take a look at: http://openmymind.net/FAQ.aspx?documentId=1

but the quick answer is that when you add items in javascript, they
aren't
added to the viewstate which means they won't be recreated on
postback...expl ains why your htmlselect is empty...

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:uM******** *****@tk2msftng p13.phx.gbl...
> I'm having a really strange problem with and HtmlSelect server control
> (listbox) and a RequiredFieldVa lidator that I am trying to use to make
> sure
> that someone has items in the listbox.
>
> The way that the HtmlSelect is populated is via a combination of
> client-side
> javascript and another aspx page (launched by the javascript).
>
> Anyway, everything seems to work just fine in terms of populating the
> HtmlSelect. However, when I postback the form, the RequiredFieldVa lidator > always thinks that there is nothing in the HtmlSelect and fails validation > (I am only using server-side validation, by the way). I have the
> ControlToValida te and all those things hooked up properly. Is there
> some
> trick to setting the RequiredFieldVa lidator for an HtmlSelect control?
> Some
> property that I am not setting?? I suspect that there is some small
> setting
> that I am missing, but I have spent way too much time on this to keep
> struggling.
>
> Any help is appreciated,
> Thanks
>
>



Jul 21 '05 #4
BK
I'm still having trouble with this, here is what I have done (I'm not using
client-side validation, by the way - customer requirement):

1) As I mentioned before, everything works fine client-side in terms of
items being added to the HtmlSelect control. I get a nice list of items in
my form, as expected. In addition, I have a hidden input field that holds a
string representation of the values, so that I can persist between
postbacks. For the sake of argument, lets call my HtmlSelect (which is
runat=server) "lstValues" and my hidden input (which is also runat=server)
"hdnValues" .

2) Now, from what I understand, I should be able to truly populate the
HtmlSelect control (as .NET sees it) on the server-side, so that when
validation rolls around in the page event cycle, it will see that items have
been added. This is where confusion sets in.

3) It seems that Page_Init is too early to set any values because
"hdnValues" is always an empty string. So, that doesn't work.

4) I have tried adding IPostbackDataHa ndler to my page and implementing
LoadPostbackDat a, but this doesn't seem to work. The values are set, but the
validation still fails.

5) I have tried adding multiple other events that supposedly occur before
validation and populating lstValues there, but all to no avail. Validation
still fails.

6) I have googled and read everything that I can find, but nothing seem to
work.

This cannot be this difficult. I feel like I have all that I need on the
client-side, I just need to know what to do and where to do it in the
code-behind in order to catch the page event before validation and populate
lstValues with the items that I have. Also, from what I understand (and I
have observed the problem, so I know its true) CustomValidator s don't work
with HtmlSelect - the event doesn't fire, so that is not an option either.

Any help is appreciated, I have been working on this all day....

TIA
BK

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:Ot******** ******@TK2MSFTN GP14.phx.gbl...
You are pretty much right about everything. Though I would expect the
client-side validation to still work (not necessarily ideal since it only
works in IE...)

-items need to be added server-side
-going to dropdownlist (server control) wouldn't change anything
-you'll need to write your own validator and use request.form

Cheers,
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:O3******** ********@TK2MSF TNGP09.phx.gbl. ..
OK, this sort of makes sense to me. But, all the documentation that I have read says that the RequiredFieldVa lidator works with an HtmlSelect server control. I guess what you are saying is that the items need to be added
server-side for this to work?

Also, if this is the case, then is there a way to add them to the
viewstate
in the described scenario or will I have to do some kind of convoluted
CustomValidatio n where I check the Request collection? Based upon the FAQ below, I am assuming that converting to web controls wouldn't solve the
problem either - this seems to be a client vs server side issue with
regard
to how the validation works.

Brian

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uP******** ******@TK2MSFTN GP14.phx.gbl...
I wouldn't expect server-side validation to work on client-side added

items.

Take a look at: http://openmymind.net/FAQ.aspx?documentId=1

but the quick answer is that when you add items in javascript, they
aren't
added to the viewstate which means they won't be recreated on
postback...expl ains why your htmlselect is empty...

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:uM******** *****@tk2msftng p13.phx.gbl...
> I'm having a really strange problem with and HtmlSelect server control > (listbox) and a RequiredFieldVa lidator that I am trying to use to make > sure
> that someone has items in the listbox.
>
> The way that the HtmlSelect is populated is via a combination of
> client-side
> javascript and another aspx page (launched by the javascript).
>
> Anyway, everything seems to work just fine in terms of populating the
> HtmlSelect. However, when I postback the form, the

RequiredFieldVa lidator
> always thinks that there is nothing in the HtmlSelect and fails

validation
> (I am only using server-side validation, by the way). I have the
> ControlToValida te and all those things hooked up properly. Is there
> some
> trick to setting the RequiredFieldVa lidator for an HtmlSelect control? > Some
> property that I am not setting?? I suspect that there is some small
> setting
> that I am missing, but I have spent way too much time on this to keep
> struggling.
>
> Any help is appreciated,
> Thanks
>
>



Jul 21 '05 #5
The information will be available in the Page_Load event. It's loaded in
the LoadPostbackDat a event of the individual contorl - not the pages.

Why not just write your own validation event....By the time you get to a
bottom's click event, the data is there, write a function "IsCustomValide ()"
which checks to see if hdnValues has a value?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:eb******** ******@TK2MSFTN GP14.phx.gbl...
I'm still having trouble with this, here is what I have done (I'm not
using
client-side validation, by the way - customer requirement):

1) As I mentioned before, everything works fine client-side in terms of
items being added to the HtmlSelect control. I get a nice list of items in
my form, as expected. In addition, I have a hidden input field that holds
a
string representation of the values, so that I can persist between
postbacks. For the sake of argument, lets call my HtmlSelect (which is
runat=server) "lstValues" and my hidden input (which is also runat=server)
"hdnValues" .

2) Now, from what I understand, I should be able to truly populate the
HtmlSelect control (as .NET sees it) on the server-side, so that when
validation rolls around in the page event cycle, it will see that items
have
been added. This is where confusion sets in.

3) It seems that Page_Init is too early to set any values because
"hdnValues" is always an empty string. So, that doesn't work.

4) I have tried adding IPostbackDataHa ndler to my page and implementing
LoadPostbackDat a, but this doesn't seem to work. The values are set, but
the
validation still fails.

5) I have tried adding multiple other events that supposedly occur before
validation and populating lstValues there, but all to no avail. Validation
still fails.

6) I have googled and read everything that I can find, but nothing seem to
work.

This cannot be this difficult. I feel like I have all that I need on the
client-side, I just need to know what to do and where to do it in the
code-behind in order to catch the page event before validation and
populate
lstValues with the items that I have. Also, from what I understand (and I
have observed the problem, so I know its true) CustomValidator s don't work
with HtmlSelect - the event doesn't fire, so that is not an option either.

Any help is appreciated, I have been working on this all day....

TIA
BK

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:Ot******** ******@TK2MSFTN GP14.phx.gbl...
You are pretty much right about everything. Though I would expect the
client-side validation to still work (not necessarily ideal since it only
works in IE...)

-items need to be added server-side
-going to dropdownlist (server control) wouldn't change anything
-you'll need to write your own validator and use request.form

Cheers,
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:O3******** ********@TK2MSF TNGP09.phx.gbl. ..
> OK, this sort of makes sense to me. But, all the documentation that I have > read says that the RequiredFieldVa lidator works with an HtmlSelect server > control. I guess what you are saying is that the items need to be added
> server-side for this to work?
>
> Also, if this is the case, then is there a way to add them to the
> viewstate
> in the described scenario or will I have to do some kind of convoluted
> CustomValidatio n where I check the Request collection? Based upon the FAQ > below, I am assuming that converting to web controls wouldn't solve the
> problem either - this seems to be a client vs server side issue with
> regard
> to how the validation works.
>
> Brian
>
> "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> wrote in message news:uP******** ******@TK2MSFTN GP14.phx.gbl...
>> I wouldn't expect server-side validation to work on client-side added
> items.
>>
>> Take a look at: http://openmymind.net/FAQ.aspx?documentId=1
>>
>> but the quick answer is that when you add items in javascript, they
>> aren't
>> added to the viewstate which means they won't be recreated on
>> postback...expl ains why your htmlselect is empty...
>>
>> Karl
>>
>>
>> --
>> MY ASP.Net tutorials
>> http://www.openmymind.net/ - New and Improved (yes, the popup is
>> annoying)
>> http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
>> come!)
>>
>>
>> "BK" <no*****@hotmai l.com> wrote in message
>> news:uM******** *****@tk2msftng p13.phx.gbl...
>> > I'm having a really strange problem with and HtmlSelect server control >> > (listbox) and a RequiredFieldVa lidator that I am trying to use to make >> > sure
>> > that someone has items in the listbox.
>> >
>> > The way that the HtmlSelect is populated is via a combination of
>> > client-side
>> > javascript and another aspx page (launched by the javascript).
>> >
>> > Anyway, everything seems to work just fine in terms of populating
>> > the
>> > HtmlSelect. However, when I postback the form, the
> RequiredFieldVa lidator
>> > always thinks that there is nothing in the HtmlSelect and fails
> validation
>> > (I am only using server-side validation, by the way). I have the
>> > ControlToValida te and all those things hooked up properly. Is there
>> > some
>> > trick to setting the RequiredFieldVa lidator for an HtmlSelect control? >> > Some
>> > property that I am not setting?? I suspect that there is some small
>> > setting
>> > that I am missing, but I have spent way too much time on this to
>> > keep
>> > struggling.
>> >
>> > Any help is appreciated,
>> > Thanks
>> >
>> >
>>
>>
>
>



Jul 21 '05 #6
BK
There is a requirement to use the validation controls (if possible, I
guess). And, there is a common page structure that does the standard
Page.Validate and Page.IsValid. So, it would be preferrable to have these
evaluate properly. Is there not a page event that I can override, load the
HtmlSelect with the values in the hdnValues field and expect the validators
to work?

If I am understanding you correctly, you are suggesting that I simply write
a function to see if something is there. If my purpose were simply to know
if something had been entered that would be a fine solution, but what I am
really trying to do is understand how I fit this within the context of using
the server-side validation controls (requiredfieldv alidator), since that is
the architecture that has been laid out.

If the server-side validation is driving off of viewstate, isn't there a
page event somewhere during the postback that I can modify the viewstate so
that the requiredfieldva lidator sees that the HtmlSelect is no longer
empty???

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
The information will be available in the Page_Load event. It's loaded in
the LoadPostbackDat a event of the individual contorl - not the pages.

Why not just write your own validation event....By the time you get to a
bottom's click event, the data is there, write a function "IsCustomValide ()" which checks to see if hdnValues has a value?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:eb******** ******@TK2MSFTN GP14.phx.gbl...
I'm still having trouble with this, here is what I have done (I'm not
using
client-side validation, by the way - customer requirement):

1) As I mentioned before, everything works fine client-side in terms of
items being added to the HtmlSelect control. I get a nice list of items in my form, as expected. In addition, I have a hidden input field that holds a
string representation of the values, so that I can persist between
postbacks. For the sake of argument, lets call my HtmlSelect (which is
runat=server) "lstValues" and my hidden input (which is also runat=server) "hdnValues" .

2) Now, from what I understand, I should be able to truly populate the
HtmlSelect control (as .NET sees it) on the server-side, so that when
validation rolls around in the page event cycle, it will see that items
have
been added. This is where confusion sets in.

3) It seems that Page_Init is too early to set any values because
"hdnValues" is always an empty string. So, that doesn't work.

4) I have tried adding IPostbackDataHa ndler to my page and implementing
LoadPostbackDat a, but this doesn't seem to work. The values are set, but
the
validation still fails.

5) I have tried adding multiple other events that supposedly occur before validation and populating lstValues there, but all to no avail. Validation still fails.

6) I have googled and read everything that I can find, but nothing seem to work.

This cannot be this difficult. I feel like I have all that I need on the
client-side, I just need to know what to do and where to do it in the
code-behind in order to catch the page event before validation and
populate
lstValues with the items that I have. Also, from what I understand (and I have observed the problem, so I know its true) CustomValidator s don't work with HtmlSelect - the event doesn't fire, so that is not an option either.
Any help is appreciated, I have been working on this all day....

TIA
BK

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:Ot******** ******@TK2MSFTN GP14.phx.gbl...
You are pretty much right about everything. Though I would expect the
client-side validation to still work (not necessarily ideal since it only works in IE...)

-items need to be added server-side
-going to dropdownlist (server control) wouldn't change anything
-you'll need to write your own validator and use request.form

Cheers,
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"BK" <no*****@hotmai l.com> wrote in message
news:O3******** ********@TK2MSF TNGP09.phx.gbl. ..
> OK, this sort of makes sense to me. But, all the documentation that I

have
> read says that the RequiredFieldVa lidator works with an HtmlSelect

server
> control. I guess what you are saying is that the items need to be added > server-side for this to work?
>
> Also, if this is the case, then is there a way to add them to the
> viewstate
> in the described scenario or will I have to do some kind of convoluted > CustomValidatio n where I check the Request collection? Based upon the

FAQ
> below, I am assuming that converting to web controls wouldn't solve the > problem either - this seems to be a client vs server side issue with
> regard
> to how the validation works.
>
> Brian
>
> "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> > wrote in message news:uP******** ******@TK2MSFTN GP14.phx.gbl...
>> I wouldn't expect server-side validation to work on client-side added > items.
>>
>> Take a look at: http://openmymind.net/FAQ.aspx?documentId=1
>>
>> but the quick answer is that when you add items in javascript, they
>> aren't
>> added to the viewstate which means they won't be recreated on
>> postback...expl ains why your htmlselect is empty...
>>
>> Karl
>>
>>
>> --
>> MY ASP.Net tutorials
>> http://www.openmymind.net/ - New and Improved (yes, the popup is
>> annoying)
>> http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to >> come!)
>>
>>
>> "BK" <no*****@hotmai l.com> wrote in message
>> news:uM******** *****@tk2msftng p13.phx.gbl...
>> > I'm having a really strange problem with and HtmlSelect server

control
>> > (listbox) and a RequiredFieldVa lidator that I am trying to use to

make
>> > sure
>> > that someone has items in the listbox.
>> >
>> > The way that the HtmlSelect is populated is via a combination of
>> > client-side
>> > javascript and another aspx page (launched by the javascript).
>> >
>> > Anyway, everything seems to work just fine in terms of populating
>> > the
>> > HtmlSelect. However, when I postback the form, the
> RequiredFieldVa lidator
>> > always thinks that there is nothing in the HtmlSelect and fails
> validation
>> > (I am only using server-side validation, by the way). I have the
>> > ControlToValida te and all those things hooked up properly. Is there >> > some
>> > trick to setting the RequiredFieldVa lidator for an HtmlSelect

control?
>> > Some
>> > property that I am not setting?? I suspect that there is some small >> > setting
>> > that I am missing, but I have spent way too much time on this to
>> > keep
>> > struggling.
>> >
>> > Any help is appreciated,
>> > Thanks
>> >
>> >
>>
>>
>
>



Jul 21 '05 #7

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

Similar topics

1
381
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);" runat="server"> <asp:ListItem value="0">&nbsp;</asp:ListItem> <asp:ListItem value="1">MyChoice1</asp:ListItem> <asp:ListItem...
0
1735
by: hash | last post by:
Hello, I have an <asp:table> control and inside this i am dynamically adding dropdownlists depending on values in the database. Whenever i try to bind any data to the HtmlSelect controls they completly disapear, the correct number show up without binding thus i know that its getting the correct values from teh dbase. here is teh code ive left...
1
2260
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 because this is a client side operation(no server intervention is required), I wrote the JavaScript below to add account number entered in a text box to...
4
2647
by: nospam | last post by:
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...
2
5791
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 WithEvents Fruits As System.Web.UI.HtmlControls.HtmlSelect Protected WithEvents Results As System.Web.UI.WebControls.Label Protected WithEvents...
10
1272
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 that the HtmlSelect is populated is via a combination of client-side javascript and another aspx page (launched by the javascript). Anyway,...
3
2089
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. When the page is rendered, the control is empty. Here is the code: In the web form: Dim UControl As AugmentedDropDownList =
1
2233
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"; //<----NOT WORKING ctrlsPlaceHolder.Controls.Add(m); this.DataBind();
0
7359
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...
0
7598
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. ...
0
7757
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...
1
5288
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...
0
3400
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3398
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1833
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
1
982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
651
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...

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.