select default radio button in form

S

steve

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"
 
S

Shiva

Try Response.Write ("Checked")

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"
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top