I have been trying to implement a custom tooltip for some gridviews on a webform per my requirements (or really gridviews on a user control .ascx on a webform) where I am now using the lightweight boundfields in the gridviews instead of asp.net labels (trying to get away from runat="server" per my requirements). Originally, I was using bootstrap to customize the asp.net Label tooltip (for a huge old webform app with a VB.net front end, and the business end in C#), but the boundfield doesn't have tooltips, so I have to create my own which I am trying to do with JQuery/bootstrap. In one suggestion the JS technique for a custom tooltip sort of "overrode" the gridview cell tooltip. This kinda worked except this technique (which does not use bootstrap at all) conflicted with bootstrap.min.js -- which is referenced in our master page because several other pages use stuff from bootstrap.min.js. The technique I'm hoping to go with uses an AJAX call to a webmethod. At first, I tried the AJAX/webmethod technique (on a c# sample webapp and then ...) on a VB.net sample webapp that I created in VS2013 last year in 2015. I was having an authentication problem here but eventually discovered that I could comment out
'settings.AutoRedirectMode = RedirectMode.Permanent
in the RouteConfig file (I observed that the updated VS2013 doesn't even add that line in RouteConfig) and then the webmethod worked in this sample VB.Net web app. All my source code for this sample app (scripts, markup, code behind) is located here:
I changed the error trap in the AJAX call to
error: function (err) {
alert("error " + JSON.stringify(err, null, 2));
console.log("AJAX error in request: " + JSON.stringify(err, null, 2));
}
In my actual (old) VB.Net webform app I don't have a RouteConfig file, and the error message that I am receiving for the AJAX call doesn't really suggest an authentication problem but that it cant find some css file/class? the css class I am referencing for styling my custom tooltip in the AJAX is located in a css file called style.css (the error message I receive is below). My question is if there is some attribute/decoration I could apply to the webmethod to make it work with my "old" webform app -- or is the "old" webform app too old to support webmethod calls? I think the app was developed in 2008-2009. Someone suggested decorating a .asmx file but my app doesn't have any asmx files (we have a few .svc files but they have nothing to do with the page I am working on but actually there are some webmethod calls to these svc's which these webmethods/AJAX calls reside in .js files). Or is there something I could do in web.config to allow the webmethod to operate in this page of my web app.
Here is the error message I get from the AJAX call (copied from the console.log)
AJAX error in request: {"readyState": 4,"responseText": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
\n<html xmlns=\"http://www.w3.org/1999/xhtml\"> \n<head> \n<title>IIS 8.0 Detailed Error - 404.0 - Not Found</title>
\n<style type=\"text/css\"> \n<!-- \nbody{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}
\ncode{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} \n.config_source code{font-size:.8em;color:#000000;}
\npre{margin:0;font-size:1.4em;word-wrap:break-word;} \nul,ol{margin:10px 0 10px 5px;} \nul.first,ol.first{margin-top:5px;}
\nfieldset{padding:0 15px 10px 15px;word-break:break-all;} \n.summary-container fieldset{padding-bottom:5px;margin-top:4px;}
\nlegend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} \nlegend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px;
\nfont-weight:bold;font-size:1em;} \na:link,a:visited{color:#007EFF;font-weight:bold;} \na:hover{text-decoration:nWhat is a way I could work around this problem with the webmethod? Do I need to place this webmethod in it's own js file and call it from there? How to do that?