Reputation: 27
i have page as view category and on that page there is category name,image name and url get display an that view category page there is also edit button now i want to edit category name,image name and url for that i need to pass that three values to another page as editpage, category name and url read in following code: firstly i want to pass image name to editpage for i tried like:
<form Name="frmEdit" method="post" action="<%=Request.ServerVariables("PATH_INFO")%>">
<!--for edit-->
<td align="left" valign="top" class="text">
<input type="hidden" name="fileId1" value=.<%=mid(FileName.Path,instrrev(FileName.Path,"\")+1)%>">
<div class="btn"><input type="submit" name="AskEdit" value="Edit" style="margin-bottom:-10px"></div>
</td>
</form>
and to pass value:
if Request.Form("AskEdit") = "Edit" then
response.Redirect("edit_category.asp?fid=" & fileId1)
end if
but i getting error for this response.Redirect("edit_category.asp?fid=" & FieldID line
so please help me,
Upvotes: 0
Views: 6029
Reputation: 39413
The answer is simpler. You have to put call
when calling a method using parenthesis. Or not use parenthesis.
call response.Redirect("edit_category.asp?fid=" & request.form("fileId1"))
or
response.Redirect "edit_category.asp?fid=" & request.form("fileId1")
Upvotes: 0
Reputation: 1242
Try this:
if Request.Form("AskEdit") = "Edit" then
response.Redirect("edit_category.asp?fid=" & request.form("fileId1"))
end if
Upvotes: 2
Reputation: 13533
If the code that you have posted is a direct copy of your code, you have a . where there should be a " which may be preventing the value from posting correctly.
<input type="hidden" name="fileId1" value=.<%=mid(FileName.Path,instrrev(FileName.Path,"\")+1)%>">
should be
<input type="hidden" name="fileId1" value="<%=mid(FileName.Path,instrrev(FileName.Path,"\")+1)%>">
Upvotes: 0