Format:
Recent snippets matching tags of Html
// Simple html page where I got 3 links, the first 1 doesn't follow the same structure as the two others. // The two others are the ones that I am interested in, based on my query I want to search for either Golf or Football and If I // if it match my query I want to get the link above it. So if I want to search for Gold I want to get the link with the href = "TheUrlIWant" StringBuilder builder = new StringBuilder(); builder.Append("<html><head></head><body>"); builder.Append("<h1>Screen Scraping practice</h1>"); builder.Append("<a href=" + (char)34 + "someurl" + (char)34 + " >Some random url on the site</a>"); builder.Append("<b>"); builder.Append("<a class=" + (char)34 + "visit" + (char)34 + " href=" + (char)34 + "TheUrlIDontWant" + (char)34 + " >Item</a>"); builder.Append("</b>");
13 Views
no comments
<span style="color:red">Hello</span> // makes font color red <span style="font-family:Arial">Hello</span> // makes font type Arial <span style="font-size:12px">Hello</span> //makes font size 12px You can also use them in one place : <span style="color:red;font-family:Arial;font-size:12px">Hello</span>
19 Views
no comments
public enum StyleConditions { IE6OrLess, IE7OrLess } public static class HtmlHelpers { #region Image public static string Image(this HtmlHelper helper, string route, string action, int id, int height, int width, int imageType, string altText, string cssClass) { var urlHelper = new UrlHelper(helper.ViewContext.RequestContext); var imageUrl = urlHelper.RouteUrl(route, new RouteValueDictionary(new {
243 Views
no comments
// tr => row and td => column <table> <tr> <td><a href= "http://caknife.com"/>Hello</a></td> <td></td> <tr> </table>
19 Views
no comments
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Html Template</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style type="text/css"> </style>
110 Views
2 comments
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Redirect Link Using jQuery</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script> <script type="text/javascript"> // Custom Library Function var Library = {
66 Views
no comments
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Simle Html Template</title> <script type="text/javascript"> /* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ *
194 Views
no comments
public static string GetRowClass(this HtmlHelper helper, AtwoodPost.Models.Page page) { return page.IsActive ? GetRowClass(helper, page.ListIndex) : "inactive-row"; }
49 Views
no comments
// Renders ANY control into HTML public static string RenderControl(Control ctrl) { StringBuilder sb = new StringBuilder(); StringWriter tw = new StringWriter(sb); HtmlTextWriter hw = new HtmlTextWriter(tw); ctrl.RenderControl(hw); return sb.ToString();
63 Views
no comments
private const string blankTarget = "_blank"; private const string selfTarget = "_self"; /// <summary> /// Open html page specified by Uri in specified target. /// </summary> /// <param name="uri"></param> /// <param name="target">"_blank", "_self", "_top", "_parent", window or frame name.</param> private static void openHtmlPage(Uri uri, string target) { if (String.Equals(target, selfTarget)) {
574 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
