Tips n Tracks

  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • black color

Reference

Sample image

Microsoft .NET Framework Get Details.

Sample image

Microsoft .NET Framework Get Details.

Reference

Sample image Microsoft .NET Framework Get Details.
Sample image

Microsoft .NET Framework Get Details.


Archive for August, 2009

JavaScript Validation for Check box list


Here is the sample JavaScript code to demonstrate that how can we validate a checkbox list inside the aspx page. Just call function vldChkBoxlist() and it will validate your checkbox list.

function vldChkBoxlist()
{
var tableBody = document.getElementById(‘CheckBoxList1’).childNodes[0];
for (var i=0;i<tableBody.childNodes.length; i++)
{
var currentTd = tableBody.childNodes[i].childNodes[0];
var listControl = currentTd.childNodes[0];
if (listControl.checked =true)
{
listControl.checked = false;
}
return false;
}

Creating Images in .Net with Bitmap and Graphics objects


Creating images in .Net is not a big task.This can be done using a bitmap object & graphics object. Using thease objcts we can create our own images or any graphicle objects.

Public Void CreateImage()
{
System.Drawing.Bitmap objBMP = new System.Drawing.Bitmap(1500, 600);
 
System.Drawing.Graphics objGraph = System.Drawing.Graphics.FromImage(objBMP);
objGraph.Clear(System.Drawing.Color.Gray);
objGraph.DrawString("Hello Anil.", new System.Drawing.Font("Courier", 10), Brushes.Green, 70, 90);
objBMP.Save("D:\\Anil\\Sample.bmp", System.Drawing.Imaging.ImageFormat.Bmp); //Please provide your path here tp save the image
}