473,659 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("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
3 8746
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("c ol")="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.publi c.dotnet.framew ork.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,p aram,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("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 #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
5242
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 radio option, like so: Choice: (Radio1) type: (select box1) Choice: (Radio1) type: (select box2) Choice: (Radio1) type: (select box3) Choice: (Radio1) type: (select box4) Choice: (Radio1) type: (select box5)
12
6533
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 courses to pass the correct option value and then be displayed at the following URL: http://www.dslextreme.com/users/kevinlyons/selectResults.html I am passing countries, products, and courses. The first two display
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"%>>
4
7391
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. Unfortunately, Internet Explorer doesn't quite work as expected -- it gives me an "invalid argument" error that I don't know how to fix. Here's the entire script, with form, annotated to explain what I'm doing and where the problem is occurring. I...
2
3655
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
2972
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 button of the list you want to use. I'm using JavaScript to automatically select the radio button corresponding to a list when you click on the list (using the onclick event handler). Is that the best event to change on, or should this
2
12425
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 into converting into code.
1
2821
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 to display the select option that a user choose in the first page i am able to display this using a textfield however i would like to display using the select drop down. following is the code for both select and radio button that i have used. 1....
8
2972
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 box with values too. Depending on the options selected from the two, the values will be calculated and displayed. everything worked fine with the calculation and im getting the right amount totalled up. I only have one issue, whenever the radio...
0
8335
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8747
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
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
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2752
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
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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.