Pages

Saturday, February 11, 2012

CompiledQuery Linq to SQL C#

using CompiledQuery Linq to SQL C# using CompiledQuery can do more good performance and more efficient.
 using System.Data.Linq;
 public static Func> userData
        = CompiledQuery.Compile((myDataContext db) => db.TableUsers);

Using StopWatch to Count Execution Time in ASP.NET

Using Stopwatch to Count Execution Time in ASP.NET

 using System.Diagnostics;
 Stopwatch sw = new Stopwatch(); //create object
 sw.Start(); // start the stopwatch
 //do something here
 sw.Stop(); // stop the stopwatch
 Console.WriteLine("Time elapsed : " + sw.ElapsedMilliseconds.ToString());

Thursday, February 9, 2012

Make calendar events on ASP.NET

Make calendar events on ASP.NET

  • Drag Calendar Control to Your WebForm
  • Choose Event Menu
  • Find DayRender
  • Double Click

//Here's the codes
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
    List dt = new List();
    for (int i = 0; i < 5; i++)
    {
        DateTime myevent = new DateTime(2012,02,2+2*i);
        dt.Add(myevent);
    }

    foreach (var item in dt)
    {
        if (e.Day.Date == item)
        {
            e.Cell.ForeColor = Color.White;
            e.Cell.BackColor = Color.BlueViolet;
            e.Cell.Text = e.Day.DayNumberText;
            e.Cell.ToolTip = "tooltip untuk tgl " + e.Day.DayNumberText;
        }
    }
}

Saturday, January 21, 2012

YM Online Status

Show YM Online Status
<img src="http://opi.yahoo.com/online?u=ymID&m=g&t=1" />

example :
<img src="http://opi.yahoo.com/online?u=ardi_ardianto_z&m=g&t=1" />



different number (t=number) will change the image
<img src="http://opi.yahoo.com/online?u=ardi_ardianto_z&m=g&t=12" />

Yahoo Messenger Chat using HTML

How to chat YM using HTML
<a href="ymsgr:sendIM?ymID">chat</a>
example
<a href="ymsgr:sendIM?ardi_ardianto_z">chat with Ardi</a>

Wednesday, September 7, 2011

Delete Folder and Subfolder

click start >> run >> fill " cmd " in the blank then enter or click OK
then write these :

  • rd\\.\directory:\foldername /s
eg. rd\\.\e:\autorun.inf /s
then, type y and press ENTER
note :if you want do this without confirmation, add /q to the command
eg. rd\\.\e:\autorun.inf /s /q

Thursday, August 25, 2011

Cara install IIS di Windows , Framework 4

Run >> lalu ketik c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
Tunggu hingga selesai.

Saturday, July 30, 2011

.NET - Convert VB to C# or C# to VB

Are you a .NET programmer?
Which is your language? C# or VB?
Do you want to convert your language to other?
Try this one : codechanger.com by Telerik

Friday, July 29, 2011

ASP.NET WebService Error

An Error was Found : 
An endpoint configuration section for contract 'TempConvert.TempConvertSoap' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name.

You should : 
Open your web.config or app.config
Find Binding ...
Then, on your SoapClient
Replace
TempConvertSoapClient svc = new TempConvertSoapClient();
with
TempConvertSoapClient svc = new TempConvertSoapClient("TempConvertSoap");

ASP.NET web service in web.config

 put inside tag <system.web>
<webservices>
<protocols>
<add name="AnyHttpSoap"/>
<add name="HttpGet"/>
<add name="HttpPost"/>
<add name="HttpPostLocalhost"/>
<add name="HttpSoap"/>
<add name="HttpSoap12"/>
<add name="Documentation"/>
</protocols>
</webservices>

ShareThis