<%@ Page Language = "VB" aspcompat=true Explicit="True"%> 
<%Dim src As String = " bet "%>

<html>
<head ></head>
<body >

<form name=loc action=testsac.aspx method=get>
<table class=s0 width=100% cellpadding=1 cellspacing=1 align=center border=1>
  <tr class=s0 align=center>
    <td>
    Search For:
    <input class=s0 size=50 name=src  value=<%=src%>>
    <input class=s0 type=submit value=Search />
    <td></td>
  </tr>
</table>
</form>

</body>
</html>

on the screen, "bet" is the search string, but I want " bet "
any ideas?

<%@ Page Language = "VB" aspcompat=true Explicit="True"%> 
<%Dim src As String = " bet "%>

you knew to quote values up there , , , but, ,

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body >
<form name='loc' action='testsac.aspx' method='get'>
<table class='s0' width='100%' cellpadding='1px' cellspacing='1em' align='center' border='1px'>
<tr class='s0' align='center'>
<td>
Search For:
<input class='s0' size='50' name='src'  value='<% =src %>'>
<input class='s0' type='submit' value='Search'>
<td></td>
</tr>
</table>
</form>
</body>
</html>

Values are quoted in html,
measurements other than zero have a dimension
/> is Xhtml and may cause errors in html

for code problems where the solution doesnt jump out and bite you, plug the code into http://validator.w3.org/ and let it find the problems

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.