Making Ajax Available To Your ASP .NET

Author: Otaku Geek /


It is already in the generation of Web 2.0, ordinary static web site or simple dynamic site no longer to satisfy the clients or users. So do we, although the experience in web is not so long, but we should try to putting some ajax into the web. As others professional said :” A little Ajax will make your web have more effect and the client will very glad”.
But how ? I don’t have experience in javascript and xml. Actually, there are bunch of ready made ajax are build by jsp, asp , php are available and free to download. If you are using visual studio, the .Net platform had make a ajax library for you already. But you need to setting it up before you can use in your project.
Here is the step:


  1. Download the require file from http://ajax.asp.net/ There are 2 files required, which is ASP.NET AJAX Extensions 1.0 (if you using vs2008 then just abandone it), another 1 is the AJAXControlToolkit.zip
  2. Install the ajax extension, and unpack the zip file.
  3. Open your web project.
  4. On the solution panel, right click on your web->add reference ->browse …
    then navigate to the folder “AjaxControlToolkit\SampleWebSite\Bin”, the add the [AjaxControlToolkit.dll] as reference.
  5. Go to your toolbox on the left handside, right click -> add tab -> key in “Ajax Control Kits”
  6. Click Browse -> navigate to the ajaxControlToolKit.dll which just added.
  7. You can now use the included sample controls in your web sites.























Simple Tips On .Net Programming Using Out Parameter

Author: Otaku Geek /

some time your function that require to return more than 1 values, and different type of variable.
Previously, you would set the function as return a List or Collection to bring out more variables, but now .Net provide a more flexi way to solve it which is using the Out parameter. It is simple, easy to use and don't even need to import others namespace.
The Example is like below :




public void say_hello()
{
string name;
DateTime date1;
string message;

message = createMessage(name, out date1);

this.textbox1.text=message;
this.textbox2.text=date1.toString();
}

public string createMessage(string name, out DateTime date1)
{
string message;
date1=DateTime.Now;
message="Hello, " + name + "!!" ;

return message;
}




thus, from the example above, the function createMessage has return more than 1 values, more than 1 variable type.
Hope this help.