Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a popup window ,in that i have html list box those items i want to be access at server side can anybody help me out in this.....
Posted

you need to add runat ="server" attribute to your html list box and add multiple="true" attribute
 
Share this answer
 
v2
Comments
chetan B Y 5-Jul-12 2:41am    
<select multiple="multiple" runat="server" id="listMedicine" style="width:300px; height:116px;">

</select>


if i add runat="server" its giving an error
like....Cannot create an object of type 'System.Boolean' from its string representation 'multiple' for the 'Multiple' property.
DamithSL 5-Jul-12 2:47am    
try adding multiple="true" attribute too..
chetan B Y 5-Jul-12 2:50am    
no if i add this jquery wont work
DamithSL 5-Jul-12 2:59am    
can you add this attribute from code behind? like htmllist.Attributes.Add("multiple", "multiple")
chetan B Y 5-Jul-12 3:26am    
added in code behind if i add this jquery wont work....

thank u.....
You cannot access it diretly you need to add

C#
ruat="server"
to accss that control in your serverside code
 
Share this answer
 
Comments
chetan B Y 5-Jul-12 2:42am    
<select multiple="multiple" runat="server" id="listMedicine" style="width:300px; height:116px;"> </select>

if i add runat="server" its giving an error like....Cannot create an object of type 'System.Boolean' from its string representation 'multiple' for the 'Multiple' property.
check this
[^]
may be help you
Thank You
ChetanV
 
Share this answer
 
Comments
chetan B Y 5-Jul-12 2:59am    
thank you,

i am using javascript to add items to select control if i put multiple="multiple" and runat="server" javascript is not working......
[no name] 5-Jul-12 3:58am    
can u paste your code
what u did?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900