default radio button in form

S

steve

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

it breaking the script and I'm getting that broken script error
I have try to omit the code and I have try <%@ but still the same

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

Many Thanks
 
R

Ray Costanzo [MVP]

What is a "broken script" error?

Request.FORM as opposed to Request.Item
(Or Request.Querystring if you're using method=get)

Ray at home
 
S

steve

Hi all
What is a "broken script" error?

Request.FORM as opposed to Request.Item
(Or Request.Querystring if you're using method=get)

Ray at home

First sorry for my late respond.

I'm using method post and I have try <% If Request.FORM("col")="test"
Then Response.Write "Checked"%>> but it still do not work
I have this on mean for "broken script"

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

steve

Hi all
First sorry for my late respond.

I'm using method post and I have try <% If
Request.FORM("col")="test" Then Response.Write "Checked"%>> but it
still do not work
I have this on mean for "broken script"

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"

Nobody love me here :(
 
S

steve

I'm still straggling to get this radio buttons to work
any help will be very much appreciated
 
R

Ray Costanzo [MVP]

I can't say that I'm familiar with your struggle. Perhaps post some details
or something. If this is a response to an old thread, I suggest starting a
new one.

Ray at work
 
S

steve

Thanks Ray

I have start a new thread
I even accidentally have post it two times, sorry
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top