30 August 2008

Create "Tab" Image Online...



and download "PNG" format, very quickly.
DayPilot is an AJAX calendar/scheduling control for ASP.NET 2.0 that allows you to to build calendar-related applications: personal or shared event calendars, resource booking applications, time tracking applications, project management applications.




This one is g8!
If you want to apply theme to Ajax Controls Toolkit, You may get following error.


Parser Error


Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unknown server tag 'ajaxToolkit:ControlName'.


This is because it is required to register all custom user controls in to the web.config file.

So, under "pages" element create "controls" and add folofing tag in to it.

add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>

Done, refresh the page. error is solved.

28 August 2008

Support you have a textbox and you want to display it's value in a label, we can face this problem that it will not show new line.
this is because the code is something like this:

protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = TextBox1.Text;
}

but now change this code by :

protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = TextBox1.Text.Replace(Environment.NewLine, "
");
}

and see the result:

this is because if using "Environment" class.

09 August 2008

You can create your own site's Search Menu in quick search panel of Internet Explorer or in Firefox.

Actually there will be a XML file named "OpenSearch.xml". See Here


Lets See...

I have a page and "OpenSearch.xml" file in my solution explorer.




And add "LINK" tag in head tag of "aspx" page.

head runat="server"
title saAction title
link rel="search" type="application/opensearchdescription+xml" href="OpenSearch.xml" title="saAction"
/head

Now run the page...

See the result in Internet Explorer...




See the result in Firefox...


But this is not enough, there is some other requirement see here.

08 August 2008


//use this name space.

using System.Net.Mail;


//User this code

MailMessage mail = new MailMessage();

//this is the main line to show friendly name in receiver's inbox.
mail.From = new MailAddress("saaction@myserver.com", "saAction Test Mail");

mail.To.Add("receiveremail@soomeserver");

mail.Subject = "Some Subject";

mail.Body = "see the friendly name in place of email address!";

SmtpClient objSMTP = new SmtpClient("Server IP");

objSMTP.Send(mail);


Lets' see the result.

07 August 2008

Here is a tool to change Visual Studio Theme (Coding Style - Color etc.)



Just select color, click on "Refresh" button to see the effect, and click on "Create" button to download "vssettings" fil.

Open Visual Studio and user "Import Export Setting..." from "Tools" men.

02 August 2008

Before few days a go, It was a requirement to create a menu dynamically and apply link in to it.

Here it is a simple example to create hyperlink to the div tag.



Here in the above image you can see that, there are two menu with div tag, If I'm using HyperLink tag it will just create hyperlink to the text only. But if I want to create HyperLink to the entire block, I will not happens with simple "A" anchor tag.

So here is that trick.




See the above image, there is a style with cursor:pointer; style. It will started to show hyperlink mouse pointer to that image tag.

Now lets add hyper link to the div tag using some javascript.



You can see that using "onClick" event of that div tag have some javascript.

onclick="document.location='./TestPage1.aspx';"

It means when user will click on that div tag it will redirect the page to the "TextPage.aspx"
Visit Leigeber for web development stuff!



This is a blog, you will find so many interesting things with download of the source code. This is very useful for JavaScript developer.