Monday, July 7, 2008

Dapoli...

Dapoli (Kokan Town)

Distance – From Pune 215 KM

Path – Pune -> Tamhani Ghat -> Khed -> Dapoli

Dapoli is a hill station in Ratnagiri District. There are so many places like beaches, temples, caves, and forts around Dapoli. The beach at Murud is absolutely tranquil. If you want peace and love the sea, this is the place to be. Following are visited places –·

Dapoli· Murud Beach

Harnai Harbor·

Anjarle Beach

Kadyavarcha Ganpati

Journey starts here...

We set-off at 12.30 PM from B4 F4 Kothrud. Gopal seat near driver seat. Kalpesh,Sam Ashish in middle seat, Me and Roshan preferred to seat at back. It was quiet cold, we filled diesel and moved towards Tamhini. Tamhini Ghat was as always beautiful even in night also and add to that was sunk in Mist. we were really enjoying ride in ghat. First disappointment of a tour was CD Player was not working well , but we were not really disappointed as KALPESH and ROSHAN were with us and all required ammunition (Isnt it Guys). Our journey starts with songs, jokes and KILCHYA which we like most, having all kind of masti in the TAVERA.

We were just passed 60 km from Pune , time 2.30 am and can you imagine what we seen. It was a fog, beautiful fog in a dark night. What a NAJARA was that. But we were not able to go ahead as it was impossible for driver to drive in such a fog without fog lights, so we decided to take a break for a while and we stopped our TAVERA at road side in middle of GHAT. It was dark night, we are in middle of GHAT , the sky was pouring water, cool breeze let us feel shivering, nothing can be seen only can be listen and feel that disaster. Gopal,Roshan,Ashish and me was enjoying the fog where as Kalpesh ,Sam preferred to take some rest.

At 4.00 am , our journey starts towards Dapoli.

To Be Continued... :)

Thursday, June 12, 2008

SQL Server Magic

Hey Pals...
Just try out this
DECLARE @ AS INT
SET @= 6
PRINT @

What you think by looking code?
Isn't it throw an error....but
thats true internally '@' is treated as variable so it will show you output as normal variable.
Just try it..

Wednesday, May 21, 2008

Working with postback of dropdown list inside Gridview

Many a times there are circumstances where by we need to use dropdown list inside a Gridview and also handle the index changed event of the dropdown list. The easy example of this kind of requirement would be when we nee to fill another dropdown list in the same row from the value selected in the first dropdown list. We all know that the dropdown list does not support command name property so you cannot handle the event in the row command event. A simple solution to the problem is to use the namingcontainer in the selectedindexchanged event and get the reference of the parent row view। After that we can do what we want from the row view Here is an example in the code -
protected void dropdownlist1_SelectedIndexChanged(object sender, EventArgs e) { // get reference to the rowGridViewRow gvr = (GridViewRow)(((Control)sender)।NamingContainer); // Get the reference of this DropDownlistDropDownList dropdownlist1 = (DropDownList) gvr.FindControl("dropdownlist1"); // Get the reference of other DropDownlist in the same row. DropDownList ddlParagraph = (DropDownList) gvr.FindControl("ddlParagraph");}

Tuesday, May 20, 2008

Windows Workflow Foundation ?



Windows Workflow Foundation is the programming model, engine and tools for quickly building workflow enabled applications on Windows. It consists of a .NET Framework version 3.0 (formerly WinFX) namespace, an in-process workflow engine, and designers for Visual Studio 2005. Windows Workflow Foundation is available for both client and server versions of Windows. Windows Workflow Foundation includes support for both system workflow and human workflow across a wide range of scenarios including: workflow within line of business applications, user interface page-flow, document-centric workflow, human workflow, composite workflow for service oriented applications, business rule driven workflow and workflow for systems management

Monday, May 19, 2008

C# 3.0 - Extension Methods

Developer code for assemblies. Compile it & publish it for client use. User of assembly may like to have some additional functionality in data types of the assembly. e.g int or Int32 do not have function to convert integer to complex number. ComplexNumber is the new data type defined by user.Now with C# 3.0 has provided with the concept of extension methods. Extension methods enable us to extend the functionality of data types already defined. No source code of the assembly is available to modify & recompile the assembly. Still one can extend the data types functionality.Inheritance also provides capability to extend the functionality but the extended functionality is available only for derived classes & not to the base class. e.g Consider I'd like to have a ToInt function in String class. If I use inheritance approach, I have to create new derived type. So I cannot use methods of derived type on my String objects.Extension methods are written in static class. The method should also a static method. First parameter of the method must be of type being extended. The first parameter must have this keyword before it.See the code below.
public static class ExtensionInt
{
public static Complex ToComplex(this int val)
{
Complex temp = new Complex();
temp।Real = val; return temp;
}
}
Complex is the type defined as follows:
public class Complex
{
public int Real;
public int Imag;
public override string ToString()
{
return (Real।ToString() + "+i" + Imag।ToString());
}
}
Use the method ToComplex for int or Int32.
static void Main(string[] args)
{
int i = 5; Console।WriteLine(i।ToComplex()।ToString());
}
Sealed classes can take advantage of extension methods. LINQ makes use of extension methods defined in Enumerable static class. The class extends functionality of objects implementing IEnumerable interface. To use the extension methods from Enumerable class refer the assembly System.Core.