Wednesday, May 25, 2005

Accessing Parent form Properties in Another ASPX form using Context.Handler.

If you have some properties in a Web form and you need then in another from that is transferred using Server.Transfer method.

This is helful by not using session variables or Query strings.

Create a property in the Parent Web form.
Add this line below the @ directive on the target page.

<% Reference Page="Parentpage.aspx" %>

Now in the code behind of the child page, declare a varaible of type Parentpage.

Private PG Parentpage.

A reference to the parentpage can be obtained using the Context.Handler property like this.
PG = (WebForm3)Context.Handler;

all public properties and methods of Parentpage can be accessed by PG.

Thursday, May 19, 2005

Travelling to London????? Need Transport help?

if you are a travelling to london and need info on the routes, distances and the transport facilities in london, check out this site, wonderful site with interactive maps.

http://www.tfl.gov.uk/tfl/

Thursday, May 05, 2005

Windows ComboBox is different from Web dropdown list....

Basically the windows combobox is slightly different from the Webforms's Dropdownlist.
Web dropdown provides a ListItem class to store Text and Value for the dropdown.

To add Text and Value parts to a Windows combobox do this,
Create a new class and name it myListItem and add two properties to it name Text and Value.
Follow the code below to get it working......

Code to populate the combobox.
=======================
comboBox1.Items.Add(new myListItem("1","11"));
comboBox1.Items.Add(new myListItem("2","22"));
comboBox1.Items.Add(new myListItem("3","33"));
comboBox1.Items.Add(new myListItem("4","44"));
comboBox1.Items.Add(new myListItem("5","55"));

comboBox1.DisplayMember = "Text"; //should refer the property defined in the class
comboBox1.ValueMember = "Value"; //should refer the property defined in the class

Code to Read selected items from combobox.
================================
((myListItem)comboBox1.SelectedItem).Value;

myListItem Class Code block.
=====================

public class myListItem
{
private string _Text;
private string _Value;
public myListItem(string sText, string sValue)
{
Text = sText;
Value = sValue;
}
public string Text
{
get
{
return _Text;
}
set
{
_Text = value;
}
}
public string Value
{
get
{
return _Value;
}
set
{
_Value = value;
}
}
}

Wednesday, May 04, 2005

The Mindset of a Software Pro......

The name is good, the brand is big
But the work I do is that of a pig
The work or the brand, what is my way?
I dont know if I should stay.

To work, they have set their own way
Nobody will care to hear what I say
My will be NULL, they wont change their way
I dont know if I should stay.

The project is in a critical stage
But to do good work, this is the age
This dilemma is killing me day by day
I dont know if I should stay.

The money is good ,the place is great
But the development is at a very small rate
Should I go for the work, orwait for pay
I dont know if I should stay.

The managers dont know what they talk
The team doesnt know where they walk
That's a bad situation, what say?
I dont know if I should stay.

I can go to any other place
But what if I get the same disgrace
I cant keep switching day by day
I dont know if I should stay.

The -ves are more, the +ves are less
Then why have this unnecessary mess
No more will I walk their way,
Its all done, I won't stay.

Monday, May 02, 2005

HTML, Elements, Events, and Back with ASPX pages

There are so many instances when we might have to prevent the user from clicking the back button, or might have to prevent the user from navigating to a page by directly typing in the URL......

This link gives an insight on doing some similar activities with the browser...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebteam/html/webteam07032000.asp

Using Microsoft Visual Studio .NET to deploy Microsoft .NET Framework applications with Dotnetfx.exe

This article describes how to use Microsoft Visual Studio .NET to deploy Microsoft .NET Framework applications with Dotnetfx.exe, the .NET Framework redistributable package.

Click on the link to read more....
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/vsredistdeploy.asp

Have a Weekend plan in and around Bangalore/Mysore

Come weekends and Iam pretty sure we were waiting for those 2 days,
and if your an adventerurer and a nature lover like me, then am sure you cannot be reached on your cell phone nor in your home.

Here is a good link to visit for details on accomodation and facilities available there......
http://www.junglelodges.com/