Wednesday, March 4, 2009

I'm just too wrapped up in work mostly

Generally did I ever make an appointment with you, maybe travelling to bangalore, or meeting you in amsterdam, or maybe even in ny. I apologise. First of all thanks to the series of unprecedented events in my life, starting with the american banks, my company has put its salary slips in the defensive mode, hence I am stripped of the extra cash I could have accured and hence travelled(Sounds to me like a swell crib already :), but the list goes on..). Second, thanks to my lack of studies so far, I have not cleared any good college in or around bangalore (IIM being my preference there. I got a call from allianz, blr, but I din go for the gd. Too bad a situation to ride out for a job again next year or maybe even after that.) And last but not the least.. I'm on a quest that does not encompass anything to do with bangalore right now(And if you are smart enough you have caught very correctly what I was trying to inculcate).

For the abroad part. Simple and easy excuse. Getting a visa got tougher. I still want to travel and meet you people, but no time. As for my friends in the U.S. I'm sure you are not reading this. In case you are, I would recommend not thinking about me for a while. I might be travelling, but thats a nigh negligible possibility, considering recession and my profile in my company. Its just been 1.5 years fr christ sakes. As they say here it is hard to make a person travel before two years. Although I still conteplate on why and how my colleagues who joined with me have just returned from trips to Canada, the U.S. and Europe.

Oh and yeah.. for the friends who I drank alcohol wityh.. if you are reading this, please understand that i've been off the bottle for some time now and next time we meet, do not expect me to drink like I once used to :).

The dancing's still happening. Only a lot lesser though. Wonder what will happen after I get booked :).

Wednesday, February 18, 2009

Outlook on life

EA Sports is developing a lot of good games nowadays. I am personally a fan of the football games they make. There is one game I recommend people to play to gain an experience of what life has in store for them. Its called Sims 2. Its a real life simulation of people and their daily lives. Right from going to a new place, getting settled, and then making friends, getting a job, falling in love, marriage, kids, their troubles, etc. Its a lil long but its worth it. At least it prepares you for life and what it holds in store for you. Just the other day I had this colleague who told me that I had no experience of raising a baby girl and what problems/issues are commonly observed. I can now proudly say. I can now proudly say I know what its like to raise a baby girl. Sounds like an advertisement. Well the sad part is that I am not getting paid to say this. But its true for certain. For all my friends who are struggling to understand - how to keep their marriages going. Play this game before you experiment in real life. I lost hope at the part I had to raise a child in the game.

This is a small code but helps a lot

For all ppl who want to find out how to validate e-mail addresses visit here

Tuesday, December 30, 2008

Changes made to deploy ASP.NET 2.0 AJAX 1.0 control in MOSS 2007 application

- Downloaded ASP.NET 2.0 AJAX 1.0 extentions from http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&DisplayLang=en

- Downloaded ajax.config feature and from http://www.codeplex.com/features/Release/ProjectReleases.aspx?ReleaseId=2502

added and deployed wsp and activated ajax.config feature on necessary web application.


-Made a web part

using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
using System.ComponentModel;

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;


namespace CompanyName
{
[XmlRoot(Namespace = WebPartConstants.WEBPART_NAMESPACE), DefaultProperty(WebPartConstants.DEFAULT_XML_ROOT_PROPERTY)]
public class TestWebPart : Microsoft.SharePoint.WebPartPages.WebPart
{
public TestWebPart()
{
this.ExportMode = WebPartExportMode.All;
}
protected override void CreateChildControls()
{
//EnsurePanelFix();
this.Controls.Add((UserControl)Page.LoadControl("~/_controltemplates/CompanyName/TestControl.ascx"));
}

/*protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
// Register the ScriptManager
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page); if (scriptManager == null)
{
scriptManager = new ScriptManager();
this.Controls.Add(scriptManager);
}
}*/



/*private void EnsurePanelFix()
{
if (this.Page.Form != null)
{
String fixupScript = @"
_spBodyOnLoadFunctionNames.push(""_initFormActionAjax"");
function _initFormActionAjax()
{
if (_spEscapedFormAction == document.forms[0].action)
{
document.forms[0]._initialAction =
document.forms[0].action;
}
}
var RestoreToOriginalFormActionCore =
RestoreToOriginalFormAction;
RestoreToOriginalFormAction = function()
{
if (_spOriginalFormAction != null)
{
RestoreToOriginalFormActionCore();
document.forms[0]._initialAction =
document.forms[0].action;
}
}";
ScriptManager.RegisterStartupScript(this,
typeof(TestWebPart), "UpdatePanelFixup",
fixupScript, true);
}
}*/



}
}

-Made a user control

--- ascx file---------
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TestControl.ascx.cs" Inherits="TestControl_TestControl" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>








---code file----------
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class TestControl_TestControl : System.Web.UI.UserControl
{
protected void TimerFunc1(object sender, EventArgs e)
{
newLabel.Text = DateTime.Now.ToUniversalTime().ToString();
}
}


- Modified masterpages. Added scriptmanager control in the masterpage right under the webpartmanager tag. Set EnablePartialRendering to true and set SupportsPartialRendering to true in the asp:Scriptmanager tag. Removed return from onSubmit in form tag.

- Added web part on a page.

- Ajax worked!!