473,396 Members | 1,827 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,396 software developers and data experts.

select default radio button in form

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

<% 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
3 8722
steve wrote:
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

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

in .aspx page for example like that


Here is the reason you've been unable to get help with this. aspx is .Net
technology.
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 21 '05 #2
As Bob pointed out you would be better off asking in a dotnet group.
However, IIRC, .NET no longer allows the VB subroutine call format of
"method param, param, param" and requires "method(param,param,param)"

Try changing Response.Write "Checked" to Response.Write( "Checked")

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"steve" <no****@nospam.non> wrote in message
news:cm**********@ctb-nnrp2.saix.net...
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

<% 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 #3
Thanks guys

and yes you are right that is the correct way
Response.Write ("Checked")
Jul 21 '05 #4

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

Similar topics

1
by: JT | last post by:
I have an input form for which I've created a "matrix" for user input. Basically, the user chooses a radio button and then through javascript, a select box is displayed to define a value for that...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
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...
4
by: bobsawyer | last post by:
I've been building a series of SELECT lists that are populated dynamically using HTTPRequest. Things are going pretty well, and I've got the whole thing working flawlessly in Mozilla/Firebird....
2
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: Joe Attardi | last post by:
Hi all, On a form on one of my pages I have two <select> elements, and each one is paired up with a radio button. The idea is to choose an item from one list or the other and select the radio...
2
by: Eric Layman | last post by:
Hi, I have a radio button and a combo box. Upon changing a value for radio button, the combo box values will be dynamically updated. I have an idea on how to go abt doing it but Im stuck...
1
by: runway27 | last post by:
hi i have registration form where user selects from a drop down to select their area code apart from filling other details in the form. in the next page which is a confirmation page i would like...
8
by: crayfiss | last post by:
Hi, firstly I am a total freshie in all this. From what I have gathered on the web and this forum, I finally managed to get my form up. I have a set of radio buttons with values to it and a select...
0
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...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
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...
0
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...

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.