I was wondering what capabilities ASP.Net has at the client level.
I have been using a RadioButtonList.
My control and additional textboxes look like this:
o See item number [ ]
o See items from Date [ ] to date [ ]
I have the method defined for SelectedIndexChanged event. Basically,
I am trying to clear and disable the text selections for the
unselected item.
Example:
private void RadioButtonList1_SelectedIndexChanged(object sender,
System.EventArgs e)
{
if (RadioButtonList1.SelectedValue.ToString() == "ItemNumber")
{
txtFromDate.Text = "";
txtToDate.Text = "";
txtFromDate.Enabled = false;
txtToDate.Enabled = false;
txtItemNumber.Enabled = true;
}
}
The problem is that my SelectedIndexChanged event does not fire until
the post. I can set the AutoPost=True, but this is still doing a
post. That seems like a lot of traffic (back to the server and
running code again, etc) just to disable some client level fields. I
should be able to do this all on the client because the server does
not need to know this information.
Well, I could fall back by writing some JScript to do this for me, but
I thought there would be a native way for ASP.Net to handle this.
Does anyone have any ideas?
Thanks in advance! 2 2808
If you dont want to post back then, client side JScript is the only option
you have.
"Geordie" <ge*************@abboptical.com> wrote in message
news:73**************************@posting.google.c om... I was wondering what capabilities ASP.Net has at the client level.
I have been using a RadioButtonList.
My control and additional textboxes look like this:
o See item number [ ] o See items from Date [ ] to date [ ]
I have the method defined for SelectedIndexChanged event. Basically, I am trying to clear and disable the text selections for the unselected item.
Example:
private void RadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e) {
if (RadioButtonList1.SelectedValue.ToString() == "ItemNumber") {
txtFromDate.Text = ""; txtToDate.Text = ""; txtFromDate.Enabled = false; txtToDate.Enabled = false; txtItemNumber.Enabled = true;
} }
The problem is that my SelectedIndexChanged event does not fire until the post. I can set the AutoPost=True, but this is still doing a post. That seems like a lot of traffic (back to the server and running code again, etc) just to disable some client level fields. I should be able to do this all on the client because the server does not need to know this information.
Well, I could fall back by writing some JScript to do this for me, but I thought there would be a native way for ASP.Net to handle this.
Does anyone have any ideas?
Thanks in advance!
Another option is to use HTML Radio Buttons.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer http://www.takempis.com
Big Things are made up of
Lots of Little Things.
"Vaibhav" <co************@yahoo.com> wrote in message
news:ew**************@tk2msftngp13.phx.gbl... If you dont want to post back then, client side JScript is the only
option you have.
"Geordie" <ge*************@abboptical.com> wrote in message news:73**************************@posting.google.c om... I was wondering what capabilities ASP.Net has at the client level.
I have been using a RadioButtonList.
My control and additional textboxes look like this:
o See item number [ ] o See items from Date [ ] to date [ ]
I have the method defined for SelectedIndexChanged event. Basically, I am trying to clear and disable the text selections for the unselected item.
Example:
private void RadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e) {
if (RadioButtonList1.SelectedValue.ToString() == "ItemNumber") {
txtFromDate.Text = ""; txtToDate.Text = ""; txtFromDate.Enabled = false; txtToDate.Enabled = false; txtItemNumber.Enabled = true;
} }
The problem is that my SelectedIndexChanged event does not fire until the post. I can set the AutoPost=True, but this is still doing a post. That seems like a lot of traffic (back to the server and running code again, etc) just to disable some client level fields. I should be able to do this all on the client because the server does not need to know this information.
Well, I could fall back by writing some JScript to do this for me, but I thought there would be a native way for ASP.Net to handle this.
Does anyone have any ideas?
Thanks in advance!
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Vetrivel |
last post by:
Application architecture : Develop interface between two existing
systems,
a. Enterprise CRM system
b. Web based intranet system.
Environment : Intranet
Server : IIS and ASP.
Script :...
|
by: Stephanie Stowe |
last post by:
Hi. I have never worked on a project that requires IE. So I have done the
vast majority of my work server side, delivering cross-browser compliant
HTML to the client. I am working on a bug fix to a...
|
by: Ken Allen |
last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other
languages and done some COM work for a number of years. I am attempting to
understand how to map an older program...
|
by: Josef Meile |
last post by:
Hi
I wanted to programmatically disable events like SelectedIndexChanged without
using a boolean flag, which indeed I find a quick and dirty solution. So, I
found a
piece of code that do this...
|
by: Jim Hammond |
last post by:
I can get data from a client-side assembly to the server in two manual
steps, but I need to be able to do it in one step.
Step 1:
The user presses the manually coded "Step 1" button, which calls...
|
by: Matt |
last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or
Client-Side form validation? Since I think each validator control can select
either 1) JavaScript based error dialog or 2)...
|
by: Rea Peleg |
last post by:
Hi all
Is it possible to handle web controls events on client side???
I wrote a simple favascript function inside the <header> area of an aspx
web form.
This function is called on...
|
by: ezelasky |
last post by:
I am trying to get a client side javascript function to invoke when the
selection changes in a drop down list box. I have tried :
ddl_specs.Attributes = "javascript";
ddl_specs.Attributes =...
|
by: controlbox |
last post by:
I have recently inplemented some drop-down lists (combos) on a page where one is dynamically populated according to the selection of another using the microsoft ajax extensions. I had to set...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
| |