to maintain compatibility with a classic ASP system, I essentially need to build the equivalent of an ASP.NET datagrid (complete with read, insert and update capability) in Classic ASP, are there any tools out there that make this any easier than just simply handcoding tables? I'm fairly rusty at Classic ASP as well so an easy solution is much appreciated, thanks!
R – Datagrids and Classic ASP
asp-classicdatagrid
Related Solutions
Doing a bit more searching I found
which in turn linked to
http://www.aspfree.com/c/a/ASP/Consuming-a-WSDL-Webservice-from-ASP/
This is pretty much how I'm doing things now, so perhaps this is the best solution?
A simple bridge to pass a single session variable from classic asp to .net serverside (hiding your sessionvalue from the client), would be this:
On the ASP end: An asp page to output your session, call it e.g. asp2netbridge.asp
<% 'Make sure it can be only called from local server ' if (request.servervariables("LOCAL_ADDR") = request.servervariables("REMOTE_ADDR")) then if (Request.QueryString("sessVar") <> "") then response.write Session(Request.QueryString("sessVar")) end if end if %>
On the .net end, a remote call to that asp page. :
private static string GetAspSession(string sessionValue) { HttpWebRequest _myRequest = (HttpWebRequest)WebRequest.Create(new Uri("http://yourdomain.com/asp2netbridge.asp?sessVar=" + sessionValue)); _myRequest.ContentType = "text/html"; _myRequest.Credentials = CredentialCache.DefaultCredentials; if (_myRequest.CookieContainer == null) _myRequest.CookieContainer = new CookieContainer(); foreach (string cookieKey in HttpContext.Current.Request.Cookies.Keys) { ' it is absolutely necessary to pass the ASPSESSIONID cookie or you will start a new session ! ' if (cookieKey.StartsWith("ASPSESSIONID")) { HttpCookie cookie = HttpContext.Current.Request.Cookies[cookieKey.ToString()]; _myRequest.CookieContainer.Add(new Cookie(cookie.Name, cookie.Value, cookie.Path, string.IsNullOrEmpty(cookie.Domain) ? HttpContext.Current.Request.Url.Host : cookie.Domain)); } } try { HttpWebResponse _myWebResponse = (HttpWebResponse)_myRequest.GetResponse(); StreamReader sr = new StreamReader(_myWebResponse.GetResponseStream()); return sr.ReadToEnd(); } catch (WebException we) { return we.Message; } }
Best Answer
You might want to check out ajaxed Datatable
Start with Understanding Datatables