ASPRunner.net 9.8 Build 29967 x86
layout = Bootstrap
List page click action
Option 1 - Open Page
Field = Vehicle Title
open URL = http:||localhost:8085|dbo_ResArrStep2|edit?editid1=1151 (hard coded for testing)
how to open = Go To
Browser result (IE and Chrome)
Server Error in '/' Application.
Argument data type text is invalid for argument 1 of rtrim function.
Option 2 - Ajax Snippet using C#
Field = Vehicle Title
Client Before= nothing
Server = MVCFunctions.HeaderRedirect("dbo_ResArrStep2", "edit?editid1=" + String.Format("{0}",1151)); or
MVCFunctions.HeaderRedirect("dbo_ResArrStep2", "edit?editid1=" + String.Format("{0}","1151")); or
MVCFunctions.HeaderRedirect("dbo_ResArrStep2", "edit?editid1=" + String.Format("{0}",XSession.Session["ReservationId"]));
Browser result (IE and Chrome)
Cursor changes to pointing finger but no redirect occurs the list page is still displayed
Option 3 - Ajax Snippet using javascript
Client Before = location.href="http://localhost:8085/dbo_ResArrStep2/edit?editid1=1151"'>http://localhost:8085/dbo_ResArrStep2/edit?editid1=1151"; (hard coded for testing)
return false;
Browser result (IE and Chrome)
Cursor changes to pointing finger but no redirect occurs the list page is still displayed
Client After = location.href="http://localhost:8085/dbo_ResArrStep2/edit?editid1=1151"'>http://localhost:8085/dbo_ResArrStep2/edit?editid1=1151"
Browser result (IE and Chrome)
Cursor changes to pointing finger but no redirect occurs the list page is still displayed
Option 4 - Button on List page
Client Before = location.href = Runner.getPageUrl("dbo_ResArrStep2", "Add"); (selected the "Add" page for testing)
Browser result (IE and Chrome)
Cursor changes to pointing finger but no redirect occurs the list page is still displayed
Client After = location.href = Runner.getPageUrl("dbo_ResArrStep2", "Add"); (selected the "Add" page for testing)
Browser result (IE and Chrome)
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /dbo_ResArrStep2/Add
Server = MVCFunctions.HeaderRedirect("dbo_Reservations/list");
Browser result (IE and Chrome)
Server error occurred. See details
System.Web.Mvc.RedirectResult
I believe i am using code examples from the manual.
here is the use case
Limo reservation system
user selects one way or roundtrip
display return date and passenger count if round trip (working)
on save redirect to vehicle selection page (working in after add)
system displays list of available vehicles based on passenger count (working)
user either clicks the vehicle name or a "Select" button
on click page is redirected to next step page....(not working)
what am I missing in the redirect? it needs to go to the dbo_ResArrStep2/edit page passing XSession.Session[ReservationId"]
I have tried
MVCFunctions.HeaderRedirect("dbo_ResArrStep2", MVCFunctions.Concat("Edit?Editid1=",XSession.Session["ReservationId"].ToString()));
among many variations to pass the id
TIA
George "Missing something obvious" Benson <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=25254&image=1&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />