Skip to main content

soulgrind r's Library tagged tutorial   View Popular

Using jQuery with ASP.NET: Part 2 - Making Ajax Callbacks to the Server

  • First Ajax Steps with jQuery


    One of the most obvious client side features of any
    Javascript client library is the ability to make AJAX calls to the server.
    jQuery includes a host of Ajax functions that make it easy to retrieve content
    from a Url starting with the low level and do-everything $.ajax() function
     plus a number of others that are simpler
    and more focused to specific tasks. Here’s a list of some of the functions
    available:

  • $.ajax(opt)

    This the low level Ajax function
    with many, many options that lets you create just about any kind of Ajax
    request.
  • 5 more annotations...
05 Dec 09

Pushing Your Buttons With Practical CSS3 - Smashing Magazine

We’ll show you here how to create nice button styles without any hacks or cheats.

www.smashingmagazine.com/...ur-buttons-with-practical-css3 - Preview

css3 webdesign css html tutorial tutorials web design blog buttons

  • However, using RGBa we can create a black shadow that is transparent. This allows the shadow to work against any kind of background:
  • button.awesome, .button.awesome {

    -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    text-shadow: 0 -1px 1px rgba(0,0,0,0.25);

    }
  • 4 more annotations...

24 ways: Working With RGBA Colour

CSS3 introduces a couple of new ways to specify colours, and one of those is RGBA. The A stands for Alpha, which refers to the level of opacity of the colour, or to put it another way, the amount of transparency.

24ways.org/...working-with-rgba-colour - Preview

html5 css3 webdesign css html tutorial tutorials web design forms color colors colour blog

  • color: rgba(255, 255, 255, 0.5);
  • Like a lot of the features we’ll be looking at in this year’s 24 ways, RGBA colour is supported by a lot of the newest browsers, but not the rest. Firefox, Safari, Chrome and Opera browsers all support RGBA, but Internet Explorer does not.
  • 3 more annotations...

24 ways: Have a Field Day with HTML5 Forms

How to style a beautiful HTML5 form using some advanced CSS and latest CSS3 techniques.

24ways.org/...e-a-field-day-with-html5-forms - Preview

html5 css3 webdesign css html tutorial tutorials web design forms blog

04 Dec 09

HTML 5 and CSS 3: The Techniques You'll Soon Be Using - Nettuts+

It might be a little early to start using HTML5 and CSS3 right now, but it seems to degrade gracefully. Though whether that holds true for IE is another matter.

net.tutsplus.com/...techniques-youll-soon-be-using - Preview

html5 css3 webdesign css html tutorial tutorials web design blog

14 Nov 09

Upgrading WordPress « WordPress Codex

3 step process for upgrading wordpress to the latest version. (which my webhost doesn't install yet).

codex.wordpress.org/Upgrading_WordPress - Preview

wordpress upgrade tutorial blog howto reference blogging

    • Step 0: Before You Get Started


      • Just in case something goes wrong, make sure you have a backup. WordPress Backups is a comprehensive guide.
      • Make sure the database user name registered to WordPress has permission to create, modify, and delete database tables. If you installed WordPress in the standard way, and nothing has changed since then, you are fine.
      • Deactivate your plugins. A plugin might not be compatible with the new version, so it's nice to check for new versions of them and deactivate any that may cause problems. You can reactivate plugins one-by-one after the upgrade. This is particularly important when upgrading to WordPress 2.7!
    • Step 1: Replace WordPress files


      1. Get the latest WordPress. Either download and extract it to your computer or download it directly to the server.
        1. As a reminder, to extract a tar.gz to a folder use this command, replacing (folder name) with the name of your folder: tar -xvzf latest.tar.gz -C ./(folder name)
        2. Delete your old wp-includes and wp-admin directories.
        3. Copy the new WordPress files to your server, overwriting old files in the root, except perhaps the wp-content folder (see "NOTE" below). You may use FTP or shell commands to do so. Note that this means *all* the files, including all the files in the root directory as well. If you use the default or classic theme and have customized it, then you can skip that theme.
  • 5 more annotations...
04 Nov 09

A Guide to Writing Well :: Fire and Knowledge

    • Before You Start Writing


      Before you start writing an article, ask the following questions:



      1. How will I address the reader?

        (Reporter? Provider of information? Average man or woman?)
      2. What pronoun and tense will I use?

        (Impersonal reportorial? Personal but formal? Personal and casual?)
      3. What attitude will I take toward the material?

        (Involved? Detached? Judgmental? Ironic? Amused?)
      4. How much of the subject do I want to cover?
      5. Have I done enough research and/or have enough experience with the subject to write intelligently?
      6. Is there anyone I can interview to gather more information on the subject and to quote? (See also: “Interviews”)
      7. What is the one point I want to make?
30 Oct 09

Object Oriented C# for ASP.NET Developers [ASP & .NET Tutorials]

  • Advanced Inheritance: Overriding Methods
  • To have the same method do something different in a subclass, you must override that method with a new definition in the subclass. Put simply, you can re-declare the Grow method in the CoconutTree class to make it do something different!
  • 3 more annotations...

Object Oriented C# for ASP.NET Developers [ASP & .NET Tutorials]

  • Overloaded Methods




    Sometimes it makes sense to have two different versions of the same method. For example, when we modified the PickNut method in the CoconutTree class to require a parameter that specified the number of nuts to pick, we lost the convenience of being able to pick a single nut by just calling PickNut(). C# actually lets you declare both versions of the method side by side and determines which one to use by the number and type of the parameters passed when the method is called. Methods that are declared with more than one version like this are called overloaded methods.

  • public bool PickNut() {          

       if (numNuts == 0) return false;          

       numNuts = numNuts - 1;          

       return true;          

     }          

             

     public bool PickNut(int numToPick) {          

       if (numToPick < 0) return false;          

       if (numToPick > numNuts) return false;          

       numNuts = numNuts - numToPick;          

       return true;          

     }
  • 2 more annotations...

Object Oriented C# for ASP.NET Developers [ASP & .NET Tutorials]

  • Constructors




    A constructor is a special type of method that is invoked automatically when an object is created. Constructors allow you to specify starting values for properties, and other such initialization details.

    • At first glance, this looks just like a normal method. There are two differences, however:



      • Constructors never return a value; thus, they don't have a return type (void, int, bool, etc.) in their declaration.
      • Constructors have the same name as the class they are used to initialize. Since we are writing the Tree class, its constructor must also be named Tree.
  • 1 more annotations...

Object Oriented C# for ASP.NET Developers [ASP & .NET Tutorials]

  • C# Properties




    Previously, we modified the PickNut method so that it would not accept too high a number, which would cause our CoconutTree to think it contained a negative number of coconuts. But there is a much simpler way to produce this unrealistic situation:



    CoconutTree ct = new CoconutTree();        

    ct.numNuts = -10;


    <script src="http://adscluster.aws.sitepoint.com/openx/adjs.sp.php?region=6&did=adz" type="text/javascript"></script>

    How can we protect object fields like numNuts from being assigned values like this that don't make sense? The solution is to make the fields themselves private, and permit access to them using a C# Property.

  • A C# Property is a pair of methods that is used to read and write a property of an object. From here on, C# Properties will be called simply properties.
  • 6 more annotations...

Object Oriented C# for ASP.NET Developers [ASP & .NET Tutorials]

    • Here are the access modifiers supported by C#:



      • public: any code may access the class or class member.
      • private: the class or class member is not accessible outside of the class that contains it (yes, in advanced cases, you can put a class inside another class).
      • protected: the class or class member is only accessible by the class that contains it, or any subclass of that class.
      • internal: the class or class member is only accessible by code in the same assembly (DLL).
      • protected internal: the class or class member is accessible by code in the same assembly (DLL), or by any subclass of the class that contains it.


      <script src="http://adscluster.aws.sitepoint.com/openx/adjs.sp.php?region=6&did=adz" type="text/javascript"></script>

      If you don't specify any access modifier, C# will default to private.

  • Distinguishing the situations in which each access control setting is appropriate takes a little experience. It's tempting at first to just declare everything public to save yourself the trouble of worrying when something is accessible and when it isn't. While this will certainly work, it is definitely not in the spirit of object oriented programming. Code that you plan to reuse or distribute, especially, will benefit from being assigned the most restrictive access control settings that are appropriate.

Object Oriented C# for ASP.NET Developers [ASP & .NET Tutorials]

  • The code : Tree on line 6 endows the CoconutTree class with a height field and a Grow method in addition to the numNuts field

Object Oriented C# for ASP.NET Developers [ASP & .NET Tutorials]

  • 11     Tree tree1 = new Tree();



    As the comment on line 10 suggests, line 11 achieves the feat of creating a new Tree out of thin air. This is a really important line; so let me explain it in depth. The line begins by declaring the class (type) of object to be created (in this case, Tree). We then give a name to our new Tree (in this case, tree1). This is in fact identical to declaring a new variable by specifying the type of data it will contain followed by the name of the variable (e.g. string msg).



    The rest of the line is where the real magic happens. The word new is a special C# keyword that triggers the instantiation of a new object. After new comes the name of the class to be instantiated, followed by a pair of parentheses (again, in more complex cases that we shall see later, these parentheses may not be empty).



    In brief, this line says, "create a variable of type Tree called tree1, and assign it a value of a new Tree." So in fact this line isn't just creating a Tree, it's also creating a new variable to store it in.

Object Oriented C# for ASP.NET Developers [ASP & .NET Tutorials]

  • Fig. 1: Instantiating two Trees from the Tree class
  • On the right, we have two actual Tree objects. These are Trees, and they were created based on the blueprint provided by the Tree class. These objects are said to be instances of the Tree class, and the process of creating them is called instantiation. Thus, we can say that by instantiating the Tree class twice, we have created two instances of the Tree class, two objects based on the Tree class, or just two Trees. Notice that in creating these objects we have assigned a value to their height property. The first Tree is 2 meters high and the second is 5 meters high. Although the values of these properties differ, this does not change the fact that both objects are Trees.
  • 1 more annotations...
1 - 20 of 123 Next › Last »
Showing 20 items per page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo