473,320 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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("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"%>>
(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("col")="test" Then Response.Write
"Checked"%>>
Line 87: Directory
Line 88: <input type="radio" name="col">

c:\inetpub\wwwroot\esearch\search.aspx(86) : error BC30800: Method
arguments must be enclosed in parentheses.

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

Jul 21 '05 #1
2 5413
"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("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"%>>
(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("col")="test" Then Response.Write
"Checked"%>>
Line 87: Directory
Line 88: <input type="radio" name="col">

c:\inetpub\wwwroot\esearch\search.aspx(86) : error BC30800: Method
arguments must be enclosed in parentheses.

If Request.Item("col")="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
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...
7
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...
3
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...
1
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...
10
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...
7
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...
1
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...
10
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...
2
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...
8
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)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.