New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Html
C#
// 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>");
February 25, 2010 @ 11:16am
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>
by Aaron   January 24, 2010 @ 3:11pm
Tags: html
19 Views
no comments
 
C#
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 {
by Richard Kimber   January 20, 2010 @ 1:16pm
243 Views
no comments
 
// tr => row and td => column
 
<table>
    <tr>
         <td><a href= "http://caknife.com"/>Hello</a></td>
         <td></td>
     <tr>
</table>
by Aaron   January 07, 2010 @ 9:39am
Tags: html
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>
    
by jwwishart   November 04, 2009 @ 7:32pm
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 = {
by jwwishart   November 04, 2009 @ 5:34pm
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/
         *
by jwwishart   November 03, 2009 @ 9:01pm
194 Views
no comments
 
C#
public static string GetRowClass(this HtmlHelper helper, AtwoodPost.Models.Page page)
        {
            return page.IsActive ? GetRowClass(helper, page.ListIndex) : "inactive-row";
        }
by Rob Conery   August 31, 2009 @ 11:38pm
49 Views
no comments
 
C#
 
// 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();
by Groove Commerce   August 27, 2009 @ 11:32am
63 Views
no comments
 
C#
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
 
brought to you by:
West Wind Techologies


If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate