473,486 Members | 1,850 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

javascript or asp.net

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...
Nov 19 '05 #1
3 1527
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%****************@TK2MSFTNGP10.phx.gbl...
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...

Nov 19 '05 #2
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%****************@TK2MSFTNGP10.phx.gbl...
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...

Nov 19 '05 #3
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...
Nov 19 '05 #4

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

Similar topics

0
7123
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
7173
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...
1
6839
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
7305
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
5427
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,...
0
3066
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...
0
1378
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 ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
259
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...

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.