ASP.Net and JavaScript together?

A

Alex

I need to perform some of Client side manipulation:
I have a 4 checkboxes with following them 4 FileUpload
HTML controls. What I need to do is to prevent user from
uploading file by using 4th controll if 3rd is not used
and itc.,so I want to disable number 2,3 and 4 untill user
clicked 1.So,
by clicking checkbox1 -> FileUpload2 become available
by clicking checkbox2 -> FileUpload3 become available
by clicking checkbox3 -> FileUpload4 become available
I can't use server side CheckedChanged event becouse I
don't want to send any data to server yet,so I need to
implement JavaScript together with my ASP controlls.
The question is How to do so?
It suppose to looks like this:

<asp:checkbox id="CheckBox1" runat="server" Text="Upload
picture1:"
OnCheckedChanged="javascript:document.form1.FileUpload2.ena
ble"></asp:checkbox>
<input id="FileUpload1" type="file" name="FileUpload"
runat="server" width="300">
<asp:checkbox id="CheckBox2" runat="server" Text="Upload
picture1:"
OnCheckedChanged="javascript:document.form1.FileUpload3.ena
ble"></asp:checkbox>
<input id="FileUpload2" type="file" name="FileUpload"
runat="server" width="300">
<asp:checkbox id="CheckBox3" runat="server" Text="Upload
picture1:"
OnCheckedChanged="javascript:document.form1.FileUpload4.ena
ble"></asp:checkbox>
<input id="FileUpload3" type="file" name="FileUpload"
runat="server" width="300">

It is does not works,but may-be someone could help me?
Thanks in advansed.
Alex.
 
P

Phillip Windell

Alex said:
don't want to send any data to server yet,so I need to
implement JavaScript together with my ASP controlls.
The question is How to do so?

There is no such thing as an ASP Control as far as I know. Controls
are "client-side" entities while ASP is 100% server-side. It looks
like every part of this is client-side. You will have to ask in a
client-side group, probably a javaScript one, so that someone who
specializes in that can help.

You can hang around and see if you get a reply anyway, but most here
will probably just tell you the same thing I did.

--

Phillip Windell [CCNA, MVP, MCP]
(e-mail address removed)
WAND-TV (ABC Affiliate)
www.wandtv.com
 
A

Alexander Starostin

I must reply that ASP control (ASP.NET control exactly) exist. It is a
new term which came together with ASP.NET and .NET Framework. The reason
why I asked for the help with JavaScript implementation is because this
is a really new technology and it is a lot of differences from old ASP
3.0.
Anyway thanks for the advice.
Alex
 
B

Bob Barrows

Alexander said:
I must reply that ASP control (ASP.NET control exactly) exist. It is a
new term which came together with ASP.NET and .NET Framework. The
reason why I asked for the help with JavaScript implementation is
because this is a really new technology and it is a lot of
differences from old ASP
3.0.
Anyway thanks for the advice.
Alex
You'll get better help with .NET if you ask your questions on a dotnet
group, perhaps microsoft.public.dotnet.framework.aspnet. This group is
focussed on Classic ASP.

Bob Barrows
 

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,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top