473,795 Members | 2,974 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

default radio button in form

Hi all

What I'm trying to achieve is:
I have a form with two radio buttons,
if a visitors check radio button 2 and click submit in the next page
radio button 2 to be check by default

If I use this code

<% If Request.Item("c ol")="firstcoll " Then Response.Write "Checked"%>

in .aspx page for example like that

<input type="radio" name="col" value="firstcol l" <% If
Request.Item("c ol")="firstcoll " Then Response.Write "Checked"%> >
(I have try to omit the code and I have try <%@ but still the same)

it breaking the script and I'm getting error BC30800
I have post it below
Server Error in '/esearch' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.

Compiler Error Message: BC30800: Method arguments must be enclosed in
parentheses.

Source Error:

Line 84: <input checked type="radio" name="col"
value="fullcoll ">
Line 85: Africa
Line 86: <input type="radio" name="col"
value="test" <% If Request.Item("c ol")="test" Then Response.Write
"Checked"%> >
Line 87: Directory
Line 88: <input type="radio" name="col">

c:\inetpub\wwwr oot\esearch\sea rch.aspx(86) : error BC30800: Method
arguments must be enclosed in parentheses.

If Request.Item("c ol")="test" Then Response.Write
"Checked"

Jul 21 '05 #1
2 5462
"steve" <no****@nospam. non> wrote in message news:<cm******* ***@ctb-nnrp2.saix.net> ...
Hi all

What I'm trying to achieve is:
I have a form with two radio buttons,
if a visitors check radio button 2 and click submit in the next page
radio button 2 to be check by default

If I use this code

<% If Request.Item("c ol")="firstcoll " Then Response.Write "Checked"%>

in .aspx page for example like that

<input type="radio" name="col" value="firstcol l" <% If
Request.Item("c ol")="firstcoll " Then Response.Write "Checked"%> >
(I have try to omit the code and I have try <%@ but still the same)

it breaking the script and I'm getting error BC30800
I have post it below
Server Error in '/esearch' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.

Compiler Error Message: BC30800: Method arguments must be enclosed in
parentheses.

Source Error:

Line 84: <input checked type="radio" name="col"
value="fullcoll ">
Line 85: Africa
Line 86: <input type="radio" name="col"
value="test" <% If Request.Item("c ol")="test" Then Response.Write
"Checked"%> >
Line 87: Directory
Line 88: <input type="radio" name="col">

c:\inetpub\wwwr oot\esearch\sea rch.aspx(86) : error BC30800: Method
arguments must be enclosed in parentheses.

If Request.Item("c ol")="test" Then Response.Write
"Checked"


This is a Classic ASP forum, while you're posting an ASP.NET question.
If I were to respond to this as a classic ASP page, then I would say
that it should read

response.write( "Checked")
instead of
response.write "Checked"

It's clearly bitching that you don't have parens around the string in
line 86
Jul 21 '05 #2
> This is a Classic ASP forum, while you're posting an ASP.NET
question.
If I were to respond to this as a classic ASP page, then I would say
that it should read

response.write( "Checked")
instead of
response.write "Checked"

It's clearly bitching that you don't have parens around the string
in
line 86


We are blaming this on my pure English
I should first done that
http://www.google.com/search?sourcei...is+parentheses
before to post

Thanks all for your help
Jul 21 '05 #3

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

Similar topics

1
6323
by: Brian | last post by:
Hello all... I have a page that will be performing a search. The search consists of 3 radio button options. The first 2 will search the entire web through google and the site as indexed by google. The 3rd option I want to search the site using MS-Index Server. I can get them to run individually but I'm not sure how to set the parameters and test for the 3rd radio button (index server) selected on the page. I thought that, for...
7
548
by: steve | last post by:
Hi all If I use this code <% If Request.Item("col")="firstcoll" Then Response.Write "Checked"%> in .aspx page for example like that <input type="radio" name="col" value="firstcoll" <% If Request.Item("col")="firstcoll" Then Response.Write "Checked"%>>
3
8758
by: steve | last post by:
Sorry if I have post this two times. Hi all What I'm trying to achieve is: I have a form with two radio buttons, if a visitors check radio button 2 and click submit in the next page radio button 2 to be check by default If I use this code
1
6165
by: sman | last post by:
Hi, I recently read this article on About.com on how to create required fields for a form: http://javascript.about.com/library/scripts/blformvalidate.htm Everything works great except that there are no instructions on how to make checkboxes and radio buttons required. I've tried adding these to my form, but I'm having no luck. Anyone know how to add radio buttons and checkboxes using the existing code mentioned on the url? Thank you!
10
13463
by: DettCom | last post by:
Hello, I would like to be able to display or hide fields based on whether a specific Yes/No radio button is selected. This is in conjunction with a posting a just made here in the same group related to checkboxes. Thanks!!!
7
2533
by: nathaniel.k.lee | last post by:
Is it not possible, in IE, to dynamically click a radio button? I'm grabbing some values from a database and using them to populate radio buttons on a page. I have alternate code for Firefox browsers using the setAttribute() function. Everything works as planned in Firefox but in IE, the buttons won't populate and, what's worse, I can't even click on them after everything loads. I see the slight shadow that indicates you're clicking on a...
1
6892
by: kenny8787 | last post by:
Hi, can anyone help here? I have the following code generated from a database, I want to have javascript calculate the costs of the selected items using radio buttons, subtotal the costs and grandtotal the costs ready for the selected items to be inserted back to the database. I did something like this before with Checkboxes, but Radio button have to be named the same to maintain their groupings.
10
6106
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio button with this link of code: echo 'SCRIPT language=JavaScript setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //? <snip of code>
2
2889
by: Peted | last post by:
Hi Im using c# express edition 2005 I have an MDI form, where i load multiple child forms from a dll i create, using reflection and late binding The child forms have multiple radio buttons in a groupbox, and have the appearence set to button
8
4617
by: photoboy | last post by:
I have racked by brain long enough on this, so now I need the help of someone who knows what they are doing. Here is what I am trying to achieve: First, I have two radio buttons (both unchecked) that need to be validated when the submit button is clicked. Instead of the standard alert window popping up (which I have now), I want the radio button background color to change from the table color (E2E2E2) to red (FF0000) for both buttons...
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10165
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7541
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5437
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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 we have to send another system
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.