javascript or asp.net

G

Guest

guys i have a asp.net form with a ton of dropdown boxes and i need to accomplish two things on the client with no post back to server.
im also thinking that my answer lies in using javascript, but i wanted to check with the experts on this forum first.
now ive already done this using all asp.net server controls and although it works fine, the performance is just not acceptable.

i've also done a smaller version of this using web controls and very little javascript(i'm just now learning this) and the performance is what i expected.(great)
i just have a couple of problems.

1. each row of dropdown list (16) need to be hidden (invisible) on page_Load and then subsequently show (display) and the <option></option> elements dynamically loaded with a button click.

2. each dropdown list will populate a text box onselectedindex(but the text box will aready have a number in it) so, it needs to append rather than overwrite the textbox.

on the first one, this is no problem using asp.net controls, but number two problem makes me think i should try to do this with web controls and javascript.

with number two, the dropdown list wont "append" the textbox unless autoPostBack is set to true. and thats just too much posting back to the server. performance is compromised.

hopefully ive explained this problem in enough detail and do appreciate any advise and if the answer is javascript, i could use some direction (been on the web a while) searching for code to do this.
thanks again for any help on this.

rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
K

Kevin Spencer

If you want everything done on the client, stick to JavaScript. ASP and
ASP.Net are server-side technologies.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

wrote in message news:u%[email protected]...
 
K

Kevin Spencer

Sorry, I read too fast.

If you want to append a value to a textbox using JavaScript, use something
like the following:

<script type="text/javascript"><!--
function appendValue(val, box);
{
box.value = box.value + val;
}
// --></script>
<select [etc] onchange="appendValue(this.options[this.selectedIndex].value,
document.forms[0].TextBoxName)">
etc
</select>

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

wrote in message news:u%[email protected]...
 
R

rbutch

thanks kevin. i will do just that. it makes more sense to populate the text boxes and then have one asp:net button send all to the server. the continuous roundtrips were just tedious.
thanks again
rik


**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top