I have created a repeater as the page type, with a transformation for which I need to "show" the fields if the user clicks "Read More" and then hide if the user clicks "Read Less". I know how to do this in html/js, but not quite sure in a transformation. I am new to writing them, but need to do it this way so that other team members can add stories via a form format. Here is what I have written so far. Each area that is in parenthesis is a field in the page type. Can someone look at my code first to see if I wrote it correctly, and also tell me how to create the show/hide as part of it.
<li>
<div class="Alumi-stories <%# Eval<string>("CssClass") %>">
<%# String.IsNullOrEmpty(Eval<string>("Image1")) ? "" : "<img class=\"Image\" alt=\"" + Eval("ImageAlt") + "\" src=\"" + Eval("Image") + "\" />" %>
<%# String.IsNullOrEmpty(Eval<string>("Name")) ? "" : "<span class=\"Name\">" + Eval("Name") + "</span>" %>
<hr class="grn200">
<%# String.IsNullOrEmpty(Eval<string>("Quote"")) ? "" : "<div class=\"Quote\">" + Eval("Quote") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Attended"")) ? "" : "<div class=\"Attended\">" + Eval("Attended") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Studied"")) ? "" : "<div class=\"Studied\">" + Eval("Studied") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Introduction")) ? "" : "<div class=\"Introduction\">" + Eval("Introduction") + "</div>" %>
<div class="alumiText <%# Eval<string>("CssClass") %>" onclick="read-more-show(this);">
<p><a class="read-more-show hide" href="#">Read More</a> <span class="read-more-content"></p>
<%# String.IsNullOrEmpty(Eval<string>("Question1")) ? "" : "<div class=\"Question1\">" + Eval("Question1") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer1")) ? "" : "<div class=\"Answer1\">" + Eval("Answer1") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Question2")) ? "" : "<div class=\"Question2\">" + Eval("Question2") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer2")) ? "" : "<div class=\"Answer2\">" + Eval("Answer2") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Question3")) ? "" : "<div class=\"Question3\">" + Eval("Question3") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer3")) ? "" : "<div class=\"Answer3\">" + Eval("Answer3") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Question4")) ? "" : "<div class=\"Question4\">" + Eval("Question4") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer4")) ? "" : "<div class=\"Answer4\">" + Eval("Answer4") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Question5")) ? "" : "<div class=\"Question5\">" + Eval("Question5") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer5")) ? "" : "<div class=\"Answer5\">" + Eval("Answer5") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Question6")) ? "" : "<div class=\"Question6\">" + Eval("Question6") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer6")) ? "" : "<div class=\"Answer6\">" + Eval("Answer6") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Question7")) ? "" : "<div class=\"Question7\">" + Eval("Question7") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer7")) ? "" : "<div class=\"Answer7\">" + Eval("Answer7") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Question8")) ? "" : "<div class=\"Question8\">" + Eval("Question8") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer8")) ? "" : "<div class=\"Answer8\">" + Eval("Answer8") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Question9")) ? "" : "<div class=\"Question9\">" + Eval("Question9") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer9")) ? "" : "<div class=\"Answer9\">" + Eval("Answer9") + "</div>" %>
<%# String.IsNullOrEmpty(Eval<string>("Question10")) ? "" : "<div class=\"Question10\">" + Eval("Question10") + "</div>" %>
<hr class="grn100">
<%# String.IsNullOrEmpty(Eval<string>("Answer10")) ? "" : "<div class=\"Answer10\">" + Eval("Answer10") + "</div>" %>
<p><a class="read-more-hide hide" href="#">Read Less</a></span></p>
</div>
</div>
</li>
2 issues I see:
Using this example, you'll want to make sure when you process the Eval("Name") value, it's done as a string since that's what you're concatenating with.
<%# String.IsNullOrEmpty(Eval<string>("Name")) ? "" : "<span class=\"Name\">" + Eval("Name") + "</span>" %>
It should look like this:
<%# String.IsNullOrEmpty(Eval<string>("Name")) ? "" : "<span class=\"Name\">" + Eval<string>("Name") + "</span>" %>
The second issue is you're missing a closing parenthesis after the </span> tag.
Last item is you could simplify this a bit with an out of the box transformation method. It could look like this:
<%# IfEmpty(Eval("Name"), "", "<span class='Name'>" + Eval<string>("Name") + "</span>") %>
Related
`I've been searching a lot, and I think the answer to my task is a call to an AJAX function. I'm using classic ASP. Please have in mind that I'm a total newbie. I really need someone to take my hand and tell me what to do. The examples I've found so far doesn't keep the same position on the website on submit. The idea is to press the toggle button (on/off) and save immidiately. That part is working perfectly. But when you have a lot of toggle buttons, and the submit gets you to the top of the page, you have a lot of scrolling down to do after every submit
The folowing is working just fine; either it's on or off. No need to do anything, but to press the toggle button. But if you are way down the webpage, you go way up to the top of the page, and you need to scroll way down to continue where you left off. This is where I want the page to be steady as a rock: Don't do anything on submit. Don't move up, don't move down. Stay put. I hope someone can help.
<%
If Request("mode") = "msgfromadmin" Then
Dim dato10, vUser10
dato10 = Day(Date) & "/" & Month(Date) & "/" & Year(Date) & " " & Time()
vUser10 = SQLEncode(Session("username"))
If Request.Form("msgfromadmin") = Lcase("on") Then
msgfromadmin = 1
Else
msgfromadmin = 0
End If
SQL = Conn.Execute("UPDATE usersettings SET msgfromadmin = " & msgfromadmin & " WHERE username = '" & SQLEncode(Session("username")) & "'")
Response.Redirect("/profile/mysettings/")
End If
%>
<head>
<style>
.switch{position:relative;display:inline-block;width:3.43em;height:1.75em;}
.switch input{opacity:0;width:0;height:0;}
.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;}
.slider:before{position:absolute;content:"";height:1.26em;width:1.26em;left:0.25em;bottom:0.25em;background-color:white;-webkit-transition: .4s;transition:.4s;}
input:checked + .slider{background-color:#4d72ff;}input:focus + .slider{box-shadow: 0 0 0.063em #c4cbe7;}
input:checked + .slider:before{-webkit-transform:translateX(1.625em);-ms-transform:translateX(1.625em);transform:translateX(1.625em);}
.slider.round{border-radius:2.125em;}.slider
.round:before{border-radius:50%;}
</style>
</head>
<html>
<body>
<form name="msgfromadmin" action="/profile/mysettings/" method="post">
<input type="hidden" name="mode" value="msgfromadmin">
<div class="col-12 form-group row mt-4">
<div class="col-1 form-group text-center">
<label class="switch">
<input type="checkbox" name="msgfromadmin" onChange="this.form.submit();"<% If RSchosenSetting("msgfromadmin") = 1 Then %> checked<% End If %>>
<span class="slider"></span>
</label>
</div>
<div class="col-11 form-group">
Send a mail when there's a message from admin
</div>
</div>
</form>
</body>
</html>
Is it something like this you want??
You will have to obviously do the database connections etc on the submitpage.asp
I added the loop to the text and slider to generate a page that is longer.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>msgfromadmin</title>
</head>
<style>
.switch{position:relative;display:inline-block;width:3.43em;height:1.75em;}
.switch input{opacity:0;width:0;height:0;}
.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;}
.slider:before{position:absolute;content:"";height:1.26em;width:1.26em;left:0.25em;bottom:0.25em;background-color:white;-webkit-transition: .4s;transition:.4s;}
input:checked + .slider{background-color:#4d72ff;}input:focus + .slider{box-shadow: 0 0 0.063em #c4cbe7;}
input:checked + .slider:before{-webkit-transform:translateX(1.625em);-ms-transform:translateX(1.625em);transform:translateX(1.625em);}
.slider.round{border-radius:2.125em;}.slider
.round:before{border-radius:50%;}
</style>
</head>
<html>
<body>
<form name="msgfromadmin" action="msgfromadmin.asp" method="post">
<input type="hidden" name="mode" value="msgfromadmin">
<div class="col-12 form-group row mt-4">
<%for i = 1 to 100 %>
<div class="col-1 form-group text-center">
<label class="switch">
<input type="checkbox" name="msgfromadmin<%= i %>" id="msgfromadmin<%= i %>" onChange="loadXMLDoc('<%= i%>','message <%= i%> from admin')" <% If request("msgfromadmin" & i) = "on" Then %> checked<% End If %>>
<span class="slider"></span>
</label>
</div>
<div class="col-11 form-group" id=adminmessage<%=i%>>
Send a mail when there's a message from admin
</div>
<% next %>
</div>
</form>
<script>
function loadXMLDoc(incoming, incoming2) {
var demoChecked = document.getElementById("msgfromadmin"+ incoming).checked;
if (demoChecked == true) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("adminmessage"+incoming).innerHTML = this.responseText;
}
};
xhttp.open("post", "SubmitPage.asp?msgfromadmin="+ incoming +"&message="+incoming2, true);
xhttp.send();
document.getElementById("adminmessage"+incoming).innerHTML = "Mail sent to admin";
} else {
document.getElementById("adminmessage"+incoming).innerHTML = "Send a mail when there's a message from admin";
}
}
</script>
</body>
</html>
and the SubmitPage.asp
<%
If Request("msgfromadmin") <> "" then
Dim dato10, vUser10
dato10 = Day(Date) & "/" & Month(Date) & "/" & Year(Date) & " " & Time()
response.write "Mail sent to admin at " & dato10
' vUser10 = SQLEncode(Session("username"))
' SQL = Conn.Execute("UPDATE usersettings SET msgfromadmin = " & msgfromadmin & " WHERE username = '" & SQLEncode(Session("username")) & "'")
End If
%>
Hello when I add the comment in my application in the form that I have with ajax, I have to reload the browser to upload the comment. In the browser I get this error that I supposedly have in this file:
(function() {
$(document).on("ajax:success", "form#comments-form", function(ev, data) {
console.log(data);
$(this).find("textarea").val("");
return $("#comments-box").append("<li> " + data.body + " - </li>");
});
$(document).on("ajax:error", "form#comments-form", function(ev, data) {
return console.log(data);
});
}).call(this);
I have this file in comments.coffe like this:
$(document).on "ajax:success", "form#comments-form", (ev,data)->
console.log data
$(this).find("textarea").val("")
$("#comments-box").append("<li> #{data.body} - </li>")
$(document).on "ajax:error", "form#comments-form", (ev,data)->
console.log data
If you can help me, I thank you.
I had the same problem and, solve it by doing the following
In the folder app/asset/javascripts/application.js look for the next line
//= require rails-ujs and change for // require rails-ujs
In this way that library is not called and will not generate conflict with jquery.
I hope it helps you
<%=
form_for([#article,#comment], remote: true, html: { id: "comments-form", :"data-
type" =>
"json" }) do |f| %>
<% if #comment.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(comment.errors.count, "error") %> prohibited this comment
from
being saved:</h2>
<ul>
<% comment.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :body %>
<%= f.text_area :body %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
I've been looking for a bit and can't find or rather very well understand what to do, I'm sure its quite simple I'm just very new to Ruby and web apps, this one is in Sinatra for simplicity. I'd like to pass the #multiplication_table variable as well as the things the user puts into the inputs to the next results page so I can see if they put in the answers correctly but dont know how to, I think I know how to do this with a form_for but I dont know how to do that with already having a for loop.
This is my web.rb file
# web.rb
require 'sinatra'
def create_table(number)
possibles = [1,2,3,4,5,6,7,8,9,10,11,12]
int_set = possibles.shuffle
result = []
#answer_list = []
while int_set.length > 0
random_int = int_set[0]
string = (number.to_s + " x " + random_int.to_s)
int_set.delete(random_int)
if (random_int.to_s).length == 1
string += " = ______"
else
string += " = ______"
end
result << string
#answer_list << random_int.to_i * number.to_i
end
return result
end
get '/' do
#greeting = "Hi! Enter a number to generate a quick test."
erb :index
end
post '/results' do
erb :results
#multiplication_table
end
post '/' do
#multiplication_table = create_table(params[:int_to_generate])
#answers = #answer_list
erb :multiplication_table_page
end
and this is my multiplication_table_page.erb
<!-- multiplication_table_page.erb -->
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.3/css/bootstrap.min.css">
</head>
<style>
h1 {text-align:center;}
p {text-align:center;}
.form-group {float: right; width: 100%;}
input {float: right;}
#submitall{width:100%;}
</style>
<body>
<div class="container">
<h1>Here is your table! Good luck.</h1>
<form action ="/results" method="POST" class="form-inline">
<% counter = 0 %>
<% #multiplication_table.each do |equation| %>
<input type="text" name = <%= "user_answer" + counter.to_s %> class="form-control">
<h2> <%= equation %> </h2>
<% counter += 1 %>
<% end %>
<p> </p>
<input id=submitall type="submit" class = "btn btn-primary">
</form>
<p> </p>
<p>Put another number in for another table</p>
<form action ="/" method="POST" class="form-inline">
<div class = "form-group">
<input type="submit" class = "btn btn-primary">
<input type="text" name ="int_to_generate" class="form-control">
</div>
</form>
<% #answers.each do |answer| %>
<p> <%= answer %> </p>
<% end %>
</div>
</body>
</html>
I have a problem while returning jsp from controller using ajax+spring mvc. I want to refresh a piece of the full page. In fact this is display-tag table. My controller send me this page, but the data that back to me from a controller is a jstl tags it is not html page. So browser, certainly, do not show me that page.
$(document).ready(function() {
alert("asdfads");
//$('#content').load('<c:url value="/pages/new.jsp"/>');
$.ajax({
url : '/shop/getCartProducts/ajax/',
type : 'GET',
async: false,
data : {},
success : function(data) {
$('#content').html(data);
alert(data);
},
error: function (jqXHR, textStatus, errorThrown) {
alert(jqXHR + " : " + textStatus + " : " + errorThrown);
}
});
});
My Controller Looks like this
#RequestMapping(value = "/getCartProducts/ajax/", method = RequestMethod.GET)
String ajaxGetProdCart(HttpServletRequest request, Model model) {
LOG.error("We are in the controller");
PaginatedListImpl<Product> paginatedList = new PaginatedListImpl<Product>(request);
productService.getProductsFromCart(paginatedList, null, 100);
model.addAttribute("paginatedList", paginatedList);
return "cartProduct";
}
cartProduct.jsp
<display:table class="table" id="product" name="paginatedList" defaultsort="1" requestURI="/shop/cart/" excludedParams="*" export="false">
<display:column>
<a href='<c:url value="/cart/remove/"/>'> <img
src='<c:url value = "/resources/images/forbidden.png"/>'>
</a>
</display:column>
<display:column sortable="false" sortProperty="name" title="Product"
maxLength="55">
<c:url var="prodUrl" value="/product/${product.product_id}/" />
<a href='<c:out value="${prodUrl}"/>'> <c:out
value="${product.name}" />
</a>
</display:column>
<display:column property="price" paramId="price" sortable="false"
title="Price" href="#" />
<display:column property="descr" sortable="true" paramName="descr"
title="Description" maxLength="250" sortName="descr" /></display:table>
Alert show me this code it not show me html.
If what you showed us is the full code of the JSP, then you simply forgot to declare the two taglibs at the top of the JSP:
<%# taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%# taglib prefix="display" uri="http://displaytag.sf.net" %>
I have a multipart form written in Classic ASP that is based on the code below. I use stored procedures and parameters to write to the sql DB, I use Server.HTMLEncode before it is submitted also. I have javascript based validation (jquery validation plugin) as well as server side ASP validation for all the fields. I am not worried about injection but the page is vulnerable to XSS code listed below.
My question is: How do I prevent this type of cross site scripting on a classic ASP page like the one below?
Basically, all the data is collected then on the last "page" after submit is hit I run it through the server side validation. But I need to know how to prevent XSS before the user gets to the submission point.
XSS CODE:
';alert(String.fromCharCode(88,83,83))//\';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//\";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
CODE:
<%
Const NUMBER_OF_PAGES = 3
Dim intPreviousPage
Dim intCurrentPage
Dim strItem
' What page did we come from?
intPreviousPage = Request.Form("page")
' What page are we on?
Select Case Request.Form("navigate")
Case "< Back"
intCurrentPage = intPreviousPage - 1
Case "Next >"
intCurrentPage = intPreviousPage + 1
Case Else
' Either it's our first run of the page and we're on page 1 or
' the form is complete and pages are unimportant because we're
' about to process our data!
intCurrentPage = 1
End Select
' If we're not finished then display the form.
If Request.Form("navigate") <> "Finish" Then %>
<form action="<%= Request.ServerVariables("URL") %>" method="post">
<input type="hidden" name="page" value="<%= intCurrentPage %>">
<%
' Take data and store it in hidden form fields. All our fields are
' prefixed with numbers so that we know what page it belongs to.
For Each strItem In Request.Form
' Ignore the "page" and "navigate" button form fields.
If strItem <> "page" And strItem <> "navigate" Then
' If the data is from the current page we don't need
' the hidden field since the data will show in the visible
' form fields.
If CInt(Left(strItem, 1)) <> intCurrentPage Then
Response.Write("<input type=""hidden"" name=""" & strItem & """" _
& " value=""" & Request.Form(strItem) & """>" & vbCrLf)
End If
End If
Next
' Display current page fields. The fields are all named with
' numerical prefix that tells us which page they belong to.
' We need a Case for each page.
Select Case intCurrentPage
Case 1
%>
<table>
<tr>
<td><strong>Name:</strong></td>
<td><input type="text" name="1_name" value="<%= Request.Form("1_name") %>"></td>
</tr><tr>
<td><strong>Email:</strong></td>
<td><input type="text" name="1_email" value="<%= Request.Form("1_email") %>"></td>
</tr>
</table>
<%
Case 2
%>
<table>
<tr>
<td><strong>Address:</strong></td>
<td><input type="text" name="2_address" value="<%= Request.Form("2_address") %>"></td>
</tr><tr>
<td><strong>City:</strong></td>
<td><input type="text" name="2_city" value="<%= Request.Form("2_city") %>"></td>
</tr><tr>
<td><strong>State:</strong></td>
<td><input type="text" name="2_state" value="<%= Request.Form("2_state") %>"></td>
</tr><tr>
<td><strong>Zip:</strong></td>
<td><input type="text" name="2_zip" value="<%= Request.Form("2_zip") %>"></td>
</tr>
</table>
<%
Case 3
' Notice that you can do other types of form fields too.
%>
<table>
<tr>
<td><strong>Sex:</strong></td>
<td>
<input type="radio" name="3_sex" value="male" <% If Request.Form("3_sex") = "male" Then Response.Write("checked=""checked""") %>>Male
<input type="radio" name="3_sex" value="female" <% If Request.Form("3_sex") = "female" Then Response.Write("checked=""checked""") %>>Female
</td>
</tr><tr>
<td><strong>Age:</strong></td>
<td>
<select name="3_age">
<option></option>
<option<% If Request.Form("3_age") = "< 20" Then Response.Write(" selected=""selected""") %>>< 20</option>
<option<% If Request.Form("3_age") = "20 - 29" Then Response.Write(" selected=""selected""") %>>20 - 29</option>
<option<% If Request.Form("3_age") = "30 - 39" Then Response.Write(" selected=""selected""") %>>30 - 39</option>
<option<% If Request.Form("3_age") = "40 - 49" Then Response.Write(" selected=""selected""") %>>40 - 49</option>
<option<% If Request.Form("3_age") = "50 - 59" Then Response.Write(" selected=""selected""") %>>50 - 59</option>
<option<% If Request.Form("3_age") = "60 - 69" Then Response.Write(" selected=""selected""") %>>60 - 69</option>
<option<% If Request.Form("3_age") = "70 - 79" Then Response.Write(" selected=""selected""") %>>70 - 79</option>
<option<% If Request.Form("3_age") = "80 +" Then Response.Write(" selected=""selected""") %>>80 +</option>
</select>
</td>
</tr>
</table>
<%
Case Else
' You shouldn't see this error unless something goes wrong.
Response.Write("Error: Bad Page Number!")
End Select
%>
<br />
<!-- Display form navigation buttons. -->
<% If intCurrentPage > 1 Then %>
<input type="submit" name="navigate" value="< Back">
<% End If %>
<% If intCurrentPage < NUMBER_OF_PAGES Then %>
<input type="submit" name="navigate" value="Next >">
<% Else %>
<input type="submit" name="navigate" value="Finish">
<% End If %>
</form>
<%
Else
' This is where we process our data when the user submits the final page.
' I just display the data, but you're free to store the data in a
' database, send it via email, or do whatever you want with it.
'For Each strItem In Request.Form
' Response.Write(strItem & ": " & Request.Form(strItem) & "<br />" & vbCrLf)
'Next
%>
<p><strong>
Here's what you entered:
</strong></p>
<pre>
<strong>Name:</strong> <%= Request.Form("1_name") %>
<strong>Email:</strong> <%= Request.Form("1_email") %>
<strong>Address:</strong> <%= Request.Form("2_address") %>
<strong>City:</strong> <%= Request.Form("2_city") %>
<strong>State:</strong> <%= Request.Form("2_state") %>
<strong>Zip:</strong> <%= Request.Form("2_zip") %>
<strong>Sex:</strong> <%= Request.Form("3_sex") %>
<strong>Age:</strong> <%= Request.Form("3_age") %>
</pre>
<p>
Start Again
</p>
<%
End If
%>
You should use Server.HTMLEncode before writing the user input to the page, not before writing to the DB. In fact, it's better to store non encoded values in the DB to avoid double encoding.
Fixed code:
Case 1
%>
<table>
<tr>
<td><strong>Name:</strong></td>
<td><input type="text"
name="1_name"
value="<%= Server.HTMLEncode(Request.Form("1_name")) %>"></td>
</tr>
<tr>
<td><strong>Email:</strong></td>
<td><input type="text"
name="1_email"
value="<%= Server.HTMLEncode(Request.Form("1_email")) %>"></td>
</tr>
</table>
<%
Also, make sure that Request.Form("page") is a number
intPreviousPage = TryCLng(Request.Form("page"))
Internal function of mine
function TryCLng( NumeroEnTexto )
if isNumeric( NumeroEnTexto ) then
TryCLng = clng(NumeroEnTexto)
else
TryCLng = 0
end if
end function