Dropdownlist using OnSelectedIndexChanged or using Client Side OnChange Event? Which one is better

I have many forms where the use makes a selection from a dropdown list that spawns other options based off their selection.

Selection list for Reports.  User selects report 1.  Form now displays a panel that includs datapicker control to select the data range and another downdownlist to select a Team.

Another user choose to select Report 2.  Form now display a different downdownlist to select a Department.

So, each selection from the initial dropdown will provided different options.

I have the form working currently using OnSelectedIndexChanged and running function to load the new dropdown list and display and hiding the panels to the respective selection.

It just doesn't feel right to have to hit the server for each selection.  I have used Javascript in the past to accomplish similar task - but I cant access the controls if I use Javascript.

Can someone guide me ?  Point me to a working example of this type of situation?  Many Thanks

0
uholbrx
5/16/2005 1:25:41 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

1 Replies
1101 Views

Similar Articles

[PageSpeed] 10
Get it on Google Play
Get it on Apple App Store

You cant use panels if you want to use javascript. When you set a panel's visibility to false, .NET doesnt write the control to the page at all. You will need to wrap your content either in div's with style="visibility:hidden". I believe there are cross browser issues with this however. Let me know if this doesnt work for you.

 

Nick 

0
nick
5/16/2005 2:03:12 PM
Reply:

Similar Artilces:

can someone one give me difference between web form and mobile web form and which or where or when i'm using the forms?
thanks Marc Hi Marc, Based on my understanding, you want to know the differences between the ASP.NET web application and ASP.NET mobile web application. If I have misunderstood you, please feel free to let me know. The ASP.NET forms are used to develop the ASP.NET pages for desktop browsers and The ASP.NET mobile forms are used to develop the ASP.NET pages for mobile device browsers. When we create the ASP.NET mobile web forms pages, we can use nearly all the features of ASP.NET. But there are a couple of compatibility issues: Error Handling and Reporting. Tracing. Using Redi...

How to use client-side script(javascript) in DNA using .Net Remoting
Hi all,     It was known that SAO and Singleton object about .Net Remoting. When I Create an object in server side and hosting in IIS's virtual directory,I want to use javascript asynchronous invoking the remote object by HTTP channel, 80 port and SOAP formatter just like XMLHTTP invoking web service. My code as following, <script> objXmlDoc = new ActiveXObject("Msxml2.DOMDocument"); objHttp = new ActiveXObject("Msxml2.XMLHTTP"); strEnvelope = ?? objHttp.onreadystatechange = function() { ...... }   szUrl = "http://ServerNa...

using both client and server side code on onselectedindexchanged event of
I am facing an interesting problem...... When i m using dropdownlist control and using both client side javascript validation and server side code for onselectedindexchange event. it is either working for client side code or for server side, but not for both. please need help.......... Tushar Google for using attributes.add. This shoul dallow you to put a client side event on the drop down list Could you post the code please. I may have an idea of what the problem is. You see, when you put a onSelectedIndexChanged event in the code, asp.net automatically puts its own javascr...

In datawindow.net,access the database from client side event using javascript
In powerbuilder,for example,a datawindow has two columns:itemno,description. input an itemno,validate it.if not found from the database,return 1 to trigger itemerror event; if found,get the description of the item from the database,and fill it into the column "description". The question is how to fulfill the function in web datawindow,through web service? if so,I need an example to realize it. You will need to use AJAX or make a round trip on item change event. -- Dean Jones CEO PowerObjects http://www.powerobjects.com (612) 339-3355 Ext. 112 TeamSybase * *...

Cascading dropdownlist implementation using web services accessed through client side
so i implemented a cascading dropdownlist. A countryddl and a stateddl. Initially both of them are bounded to the database datasource with default selected country as united states for countryddl and stateddl is populated with all us states. whenever countryddl changes it fires up a javascript function that javascript fuction call a web service from client side and passess the currently selected country as an argument. onComplete fuction that recieves list of states as argument (for the given country).  It then clear the what ever is in the statesddl and repopulates ...

One event handle using javascript and one using code-behind
Hi, I would like to know that if I have two event procedure, let say i define one using javascript to handle event of buttonB, later i defined another buttonB_onclick event procedure in my code behind. Since both of them handle button onClick event, which sub procedure will be executed first?(javascript? or code-behind?) I would also like to know how does it actually works? Any help would be kindly appreciated. Hi, Client side (Javascript) Handler will execute first. Use below code to define JavaScript handler : buttonB.Attributes.Add("OnClick", "YourJavaScr...

using click event to change value used in form.load event?
Hi all. I need to use a value that is set in a button.click event, to create objects during page.load eventis that possible? Thanx for all help You can create objects in Button Click Event,As the Page_Load will fires first and then after the Button_Click event, when you click the button. Also you can use the sender property of the Page_Load Event. Hope this helps. - DeepakDon't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. Tha...

Access web form content from client side HTML file using javascript
I have two browser windows open, one an html file residing on the client and one an aspx page served up by the web server. Neither window is related to the other; neither one opened the other. Is it possible for javascript on the html file which resides on the user's local computer to "read" any of the information from the other open window? Ideally, I'd like to read a hidden input field from the web page. The solution only has to work in IE 6 and 7. Thanks in advance. Man, this sounds more like a virus, like spyware... Why do you need to do such thing? What I want is to open ne...

How to call web method directly form client side javascript without using hta file
Hello nice guys, I am a newbie in this forum. I need to be able to call a web service from client side javascript code without using webservices.hta file so it may work on Netscape browsers as well as IE browsers. I don't mind having to form soap request and then post it all in javascript. An example will be very helpful. Do you have any resource I may look up to, like any published article on the net, for code examples or a work around. Thanks Dean51 Hi, I wrote a library to use AJAX to consume Web Services. You can find the article, the source code (less than 8 KB) and some...

How to access the properties and methods of the ActiveX control on the client side in Web Form using javascript or vbscript
Hi All, I have looked almost every where for this, and I'll be really appreciated if someone can help me with this. I found a article in MS KB article, #317392, but it is not extactly what I wanted. How do you reference an ActiveX control's methods and properties with javascript in the ASPX? Following is what I have. Some how the following line in the btnclick() does not seems to be working. AlarmCtl.StartTimer() I have done this with just .HTML and it works just fine. Can any one help. Thanks in advance. //===========================...

no data coming back from DropDownList on post-back when populating one the client-side using cascadingdropdown extenders
Hi,  I have several DropDownLists that get populated on my page using cascadingdropdown extenders wired up to some web service methods. The cascadingdropdown extenders are working fine, and data from the web service correctly populates the dropdownlists. But my problem is when the page gets posted back to the server the dropdownlists no longer contain the data that they were populated with on the client side.Is there something special I need to do to transfer the client state back to the  server? Here is my code:   1 <table cellpadding="0" cellspacing=&qu...

When to use client side varidation and server side varidation in .net?
In .net or classic web application we can varidate user data either on client isde or server side. How to select which side varidate to be used? Thanks! Generally, I use both client and server validation. I make sure the input is in the correct format and reasonably valid on the client, then I verify the data on the server. The extent of validation also depends on the type of data that I need to validate.Here are a few references:Validating ASP.NET Server ControlsIntroduction to Validating User Input in Web FormsClient-Side Validation for ASP.NET Server ControlsSecurity Checklist...

How to use net use?
Please can any one tell me how to use the dos command net use properly? I have read the help but can't seem to get it to work. Keep getting sytax error message. Thanks in advance. "Beowulf" <who-knows@no-one.com> wrote in message news:9krutk$puu$1@news.grc.com... > Please can any one tell me how to use the dos command net use properly? > > I have read the help but can't seem to get it to work. Keep getting sytax > error message. what are you trying to do? There are about 50 options to "net use" that do a ton of different thin...

validation, is it better to have client side or use server side validator controls
 Hi All. I want to do validation on text boxes etc. Is it better to do client side validation or just use the server side validation controls?   Hi!  If for server side controls you mean RequiredFieldValidator, CompareValidator, RegularExpressionValidator, etc.. i can tell you that they use client and server validation. For instance if you use a RequiredFieldValidator, on the client will be a validation, but on the server this condition will be evaluated again. Probably one of the objetives of this is deal with client with javascript disabled. Of course I ...

How to send datatable from client side using Clint side call back event
  Hi Friends , I have buuton called SUBMIT . when user click that one a datatable which is holding some info will be sent to datbase and stored and then it Returns Status BIT 0-succes 1 -fail this  is i am doing at server side . but i want to do it from client side using callback event  Please sen d the code for this.. Thanks in advance   Your question is a little too general, but you will probably need to get into AJAX to do this. Here are some links to get you started. http://www.asp.net/ajax/documentation/live/overview/UpdatePanelOverview.aspx ...

I have a web user control being used by another web user control, but the one being used will not display the labels in the resx file.
I am using DotNetNuke version 3.13 (might be 3.013) on a Window's XP machine, SP2. I have what I find to be an extremely odd situation. I have a project called TDS.Controls. This project is a web control library. Each control has its own resx file, which is located in the App_LocalResources directory. Each control inherits from Framework.UserControlBase, just like DotNetNuke's User control in DNN\Controls\User.ascx.vb. As a matter of fact, this control is doing the exact same thing I am trying to do. It is a web user control with its own resx file being used by another web user control (See ...

How to use word macro in web form using C#
Hello i am using farpoints spread control to display data on webform. I am export data in to word file using following code,but unable to get proper format so i want to run macro to format my word document how can i do this ? please help me out! Response.Clear();Response.Buffer = true; Response.AddHeader("content-disposition", "attachment;filename=FileName.doc");Response.ContentEncoding = System.Text.Encoding.UTF7; Response.ContentType = "application/vnd.word";System.IO.StringWriter oStringWriter = new System.IO.StringWriter(); System.Web.UI.HtmlTextWrite...

can picturebutton or button control use Client-Side Events and Default Event Handlers
hello all: can picturebutton or button control use Client-Side Events and Default Event Handlers? we can use Web DataWindow client-side events . How about picturebutton or button control else? for example #if defined PBWEBFORM then pb_2.JavaScriptFile = "CRM.js" pb_2.OnClicked = "PBPictureManager_delete" #else /*action*/ #end if pb_1 is picturebutton ,but complier is error. So ,How we can ? Pls thanks I don't think you can add client-side events to those controls. You can code these events if you create a button or picture button on a ...

C#.NET WEB APPLICATION
hei guys, i need help on my application, i'm using C#.NET as front-ed and SQL as back-end, aside from a datagrid, i want to display my data using textboxes and not a datagrid, i can do it using Visual Basic 6 but since i'm a newbee at C#.NET i don't know how to do it, specially the codes, can anyone help me with it? thank you in advance! If you are doing windows development, i would suggest using 'DataForm wizard' (Use Solution Explorer-->Rightclick project-->Add new Item-->New DataForm). It will guide you through steps. If you are doing web apps. Use quickstart to learn them. h...

How to get new web app to use .NET 2.0 on Win2K server using .NET 1.1 as default framework?
I have .net framework1.1 and 2.0 on our server running win2K. i have existing applications that uses asp.net 1.1, i also have a new app that use ASP.net 2.0.  how can i set my new .NET 2.0 app to point to asp.net 2.0 without messing up my existing .NET 1.1 apps? To specify the ASP .Net version fro a web application, do the followingIn IIS Manager select the web application -> Properties -> ASP.Net TabSelect  ASP.Net version you want to use for the applicationRegards,PrashantDont forget to click "Mark as Answer" on the post that helped you. But I am running Win2K which has IIS 5.0.  I do not see any default websites/virtual directories/ or any type of ASP.NET tab.  I just dont' know how to get my program to run using .NET framework 2.0. On win2k it is a mess sometimes to get this working, well first install .net framework 2.0 on the server, then see if iis mappings are correct. publish the website and then right click properties->select 2.0. from the dropdown.  Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations...

4 Layered Web Application for Inserting data into a database using sql server as the back end and a web form as the front end using C#
4 Layered Web Application for Inserting data into a database using sql server as the back end and a web form as the front end using C# . Can someone provide with code as I am new to this architecture and framework. Better send email. Thanks In Advance, A New Bie I suggest taking a look at the Time Tracker Starter Kit (v1.x or x2.0) or the Issue Tracker Starter Kit (v1.x).  Full source code is available.  Click on the Downloads tab above to find them.  These are not exactly what you are looking for, but perhaps they will help you get started.Terri MortonEngagement Manager, NeudesicHow to ask a question...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

When to use ( and when to use ((?
I'm just not getting it. When do you use ( in a statement, when do you need to use ((, and is the space after either or both mandatory? For example, I coded this statement: if (( $_ eq $bad_guys_ip )) { more_stuff_here }; Why the two (( in an if? And why does it seem to not work when I miss the space after the ((? Thanx! Mark me as... /Corn-fused|Dense/ > I'm just not getting it. >=20 > When do you use ( in a statement, when do you need to use ((, and is > the space after either or both mandatory? >=20 > For example, I coded this sta...

Using Using
I have just completed reading a chapter in my book on performance. The books says to speed up performance on your web site you should use the using statement when opening connections. My question is how do you catch errors if you are using this as apposed to a try catch block.thanksBryan  Why would you use it as an alternative to a try/catch statement. Couldn't you just do something like  public void UsingSomeMethod() { try { SomeMethod(); } catch(SomeException e) { /// do something useful }}public void SomeMethod() { using (Something) { /// do something }}  public void SomeMethod()  {    using (Something)     {        try {}       catch(SomeException e) {}    }} Hi,So what is the actual benefit of using the using statement if you still have to put it in a try catch to catch errors, I thought that was the point of using using... to get away from the try catch which is apparently more of a memory chomper. Will it really speed up my apps then? The only benefit i can see it that you dont have to explicitly close your connection which would free up some memory there.Bryan   First of all there are two things, using Statement and using directive, I think you are referring to the 'using' statement. The using statement allows the programmer to specify when objects that use resourc...

Web resources about - Dropdownlist using OnSelectedIndexChanged or using Client Side OnChange Event? Which one is better - asp.net.web-forms

A2ZMenu tutorial index page
A2Zmenu.Com Blog Tutorials Online Exam Ask Question Utility Fun @ Work Funda Contact Us About Us Loading Test Your Skill Q. Out of Boxing and ...

A2ZMenu utilities index page
A2Zmenu.Com Blog Tutorials Online Exam Ask Question Utility Fun @ Work Funda Contact Us About Us Loading Online Tool Title Description Rating ...

Online Exam papers index page
A2Zmenu.Com Blog Tutorials Online Exam Ask Question Utility Fun @ Work Funda Contact Us About Us Loading Test Your Skill Q. Out of Boxing and ...

A2ZMenu Experts Comment
A2ZMenu team is committed in providing solution in various technologies through blogs, tutorials, Q & A etc. Our objective is to give a knowledge ...

Funny contents index page
A2Zmenu.Com Blog Tutorials Online Exam Ask Question Utility Fun @ Work Funda Contact Us About Us Loading Topic All Category Appraisal FunnyImages ...

If we work as team it will always sound good
Thought of the day. If we work as team, it will always sound good

Resources last updated: 3/5/2016 12:54:44 PM