Ask a Question related to ASP.NET General, Design and Development.
-
Meerkat #1
How to prevent changes to CheckBoxList
Hello.
Can anyone tell me if there is ANY way to prevent the user changing
the values in a checkboxlist. I just want to use it for information
only. Disabling it is not an option as it results in a unacceptable
gray color.
Many thanks in advance for any replies.
Meerkat Guest
-
Extend CheckBoxList
I'd write a UserControl that contains the CheckBoxList and the Textbox.... "MoeJoe" <anonymous@discussions.microsoft.com> wrote in message... -
How to I Iterator through a CheckBoxList?
This is an ASP.NET using C# website -
CheckBoxList
When I put a CheckBoxList on a web form and then populate it, it grows longer. The behavior I wold like would be more like the Windows Forms... -
how to prevent prevent .so-calling routine to crash from segfaults in .so
Hi, Guys I am stuck with a problem and need some help. Platform : Linux(RedHat 7.3) Problem Area : Dynamic Shared Object Libraries, POSIX... -
checkboxlist control
Why don't you keep one of the checkbox selected on load. -- Regards Khan Imran "buran" <buran@buran.com> wrote in message... -
Duncan Welch #2
Re: How to prevent changes to CheckBoxList
Use a bit of javascript in the onChanged property, and set it back to it's
checked property every time.
D
<Meerkat> wrote in message
news:k7b5gv4fl61gcebf3rvs7puf0q5cnbs86u@4ax.com...> Hello.
> Can anyone tell me if there is ANY way to prevent the user changing
> the values in a checkboxlist. I just want to use it for information
> only. Disabling it is not an option as it results in a unacceptable
> gray color.
>
> Many thanks in advance for any replies.
Duncan Welch Guest
-
Meerkat #3
Re: How to prevent changes to CheckBoxList
Hello Rajesh,
Your suggestion looks to be just the sort of thing I am looking for.
( i.e. simple) However, could I impose on your kindness a little
more and ask exactly where do I put the code that you suggest.
Is it in the code behind or the html? and what is the exact syntax.
I have tried all sorts of things but failed miserably.
Many thanks in anticipation,
Meerkat.
On Wed, 02 Jul 2003 04:58:17 -0700, Rajesh Tiwari <rajesh@dospl.com>
wrote:
>use onfocus="this.blur()"
>
>try something like
>ChkBoxId.Attributes("onfocus")="javascript:this.b lur()"
>
>hope it helps
>
>Rajesh
>
>*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
>Don't just participate in USENET...get rewarded for it!Meerkat Guest
-
Rajesh Tiwari #4
Re: How to prevent changes to CheckBoxList
hi meerkat,
sorry for the late reply.here is the code that u were looking for.
run this code and see if it is of some help
<%@ Page Language="c#" debug=true%>
<%@ Import Namespace="System.Data" %>
<Script Language="C#" runat=server>
void Page_Load(Object sender,EventArgs e)
{
lst2.Attributes["onclick"]="javascript:return false";
}
</script>
<html>
<body>
<form id=frm1 runat=server>
<asp:CheckBoxList id=lst2 runat=server>
<asp:ListItem>a</asp:Listitem>
</asp:CheckBoxList>
</form>
</body>
</html>
i hope i answered ur query.
Rajesh
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Rajesh Tiwari Guest
-
David Waz... #5
Re: How to prevent changes to CheckBoxList
how about setting ENABLED property to false
or VISIBLE property to false
"Rajesh Tiwari" <rajesh@dospl.com> wrote in message
news:eJOHA7tQDHA.3192@TK2MSFTNGP10.phx.gbl...> hi meerkat,
> sorry for the late reply.here is the code that u were looking for.
>
> run this code and see if it is of some help
>
> <%@ Page Language="c#" debug=true%>
> <%@ Import Namespace="System.Data" %>
> <Script Language="C#" runat=server>
> void Page_Load(Object sender,EventArgs e)
> {
>
> lst2.Attributes["onclick"]="javascript:return false";
> }
> </script>
> <html>
> <body>
> <form id=frm1 runat=server>
> <asp:CheckBoxList id=lst2 runat=server>
> <asp:ListItem>a</asp:Listitem>
> </asp:CheckBoxList>
> </form>
> </body>
> </html>
>
> i hope i answered ur query.
>
> Rajesh
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
David Waz... Guest



Reply With Quote

