Each .aspx page is rendered by one of two possible parsers. When a request is received for an .aspx page, the SharePoint isapi filter determines who will handle the rendering of the page—Asp.net orthe SharePoint SafeMode parser. The first parser, Asp.net, requires the least amount of introduction. The second parser is unique to Windows SharePoint Services.
The intent of this discussion is to cover the differences between the two parsers. To be very clear, this discussion applies to pages which come from the main application root of a SharePoint virtual server. Pages which originate from either the "_layouts" or "_vti_bin" virtual directories can be excluded from the discussion.
As everyone knows, all pages within SharePoint are stored in the database. This effectively means that for each document, you will find a row in the docs table for that document. The actual file is stored in the Content column. This is true for all files. However, there is one exception - some .aspx pages don't actually have their content stored in the database. Instead, these pages reference files which exist on the server's file system. These pages are considered ghosted pages.
From a technical standpoint, ghosted pages are those rows in the docs table which have null values for the Content column and a non-null value for the SetupPath column which points to a file on the file system itself. The referenced file essentially serves as a template and content source.
What pages are ghosted? For example, the default home page is a ghosted page. Any web part pages created the via New Web Part Page user interface also ghosted.
As you can see, I've described ghosted pages as the exception to the rule. What does it mean if a document doesn't reference a template on the file system? Or, more to the point, the Content column actually contains data? These pages are known as unghosted .aspx pages and they are routed through the SafeMode parser.
Tuesday, May 26, 2009
Monday, February 16, 2009
Text of Budget speech of acting finance minister Pranab Mukherjee
Following is the text of Budget speech of acting finance minister Pranab Mukherjee.
Mr. Speaker, Sir,
I rise to present the Interim Budget for 2009-10.
2. Five years ago the people of India had voted for change. In the words of our Prime Minister, Dr. Manmohan Singh, people had sought "a change in the manner in which this country is run, a change in the national priorities and a change in the processes and focus of the Government". The Common Minimum Programme of the United Progressive Alliance, built around ‘Aam Aadmi’, was a response to this call for change. As indicated by Shri P. Chidambaram in July 2004, this programme spelt out seven clear economic objectives:
(i) maintaining a growth rate of 7-8 per cent per year for a sustained period;
(ii) providing universal access to quality basic education and health;
(iii) generating gainful employment and promoting investment;
(iv) assuring hundred days of employment to the breadwinner in each family at the minimum wage;
(v) focusing on agriculture, rural development and infrastructure;
(vi) accelerating fiscal consolidation and reform; and
(vii) ensuring higher and more efficient fiscal devolution.
3. As I present the sixth budget of the Government of the United Progressive Alliance which completes its tenure in a couple of months, I can say with confidence that every effort has been made by the government to deliver on the commitments made.
4. For the first four years of the UPA government, our policies ensured a dream run for the economy with Gross Domestic Product (GDP) recording increase of 7.5 per cent, 9.5 per cent, 9.7 per cent and 9 per cent from fiscal year 2004-05 to 2007-08. For the first time, the Indian economy showed sustained growth of over 9 per cent for three consecutive years. With per capita income growing at 7.4 per cent per annum, this represented the fastest ever improvement in living standards over a four year period.
5. During this period, the fiscal deficit came down from 4.5 per cent in 2003-04 to 2.7 per cent in 2007-08 and the revenue deficit declined from 3.6 per cent to 1.1 per cent.
6. Investment and savings showed significant improvement. The domestic investment rate as a proportion of GDP increased from 27.6 per cent in 2003-04 to over 39 per cent in 2007-08. The gross domestic savings rate shot up from 29.8 per cent to 37.7 per cent during this period. The gross capital formation in agriculture as a proportion of agriculture GDP improved from 11.1 per cent in 2003-04 to 14.2 per cent in 2007-08.
7. The buoyant growth of Government revenues facilitated fiscal consolidation as mandated in the FRBM Act. The tax to GDP ratio increased from 9.2 per cent in 2003-04 to 12.5 per cent in 2007-08 bringing us within striking distance of the target for fiscal correction. This also enhanced our capacity to raise resources internally to finance our growth at the rate of 9 per cent per annum during the Eleventh Five Year Plan.
8. All this would not have been possible without the guidance
of UPA Chairperson, Smt. Sonia Gandhi, the inspiring leadership of Prime Minister, Dr. Manmohan Singh and the hard work put in by my predecessor, Shri P. Chidambaram.
Mr. Speaker, Sir,
I rise to present the Interim Budget for 2009-10.
2. Five years ago the people of India had voted for change. In the words of our Prime Minister, Dr. Manmohan Singh, people had sought "a change in the manner in which this country is run, a change in the national priorities and a change in the processes and focus of the Government". The Common Minimum Programme of the United Progressive Alliance, built around ‘Aam Aadmi’, was a response to this call for change. As indicated by Shri P. Chidambaram in July 2004, this programme spelt out seven clear economic objectives:
(i) maintaining a growth rate of 7-8 per cent per year for a sustained period;
(ii) providing universal access to quality basic education and health;
(iii) generating gainful employment and promoting investment;
(iv) assuring hundred days of employment to the breadwinner in each family at the minimum wage;
(v) focusing on agriculture, rural development and infrastructure;
(vi) accelerating fiscal consolidation and reform; and
(vii) ensuring higher and more efficient fiscal devolution.
3. As I present the sixth budget of the Government of the United Progressive Alliance which completes its tenure in a couple of months, I can say with confidence that every effort has been made by the government to deliver on the commitments made.
4. For the first four years of the UPA government, our policies ensured a dream run for the economy with Gross Domestic Product (GDP) recording increase of 7.5 per cent, 9.5 per cent, 9.7 per cent and 9 per cent from fiscal year 2004-05 to 2007-08. For the first time, the Indian economy showed sustained growth of over 9 per cent for three consecutive years. With per capita income growing at 7.4 per cent per annum, this represented the fastest ever improvement in living standards over a four year period.
5. During this period, the fiscal deficit came down from 4.5 per cent in 2003-04 to 2.7 per cent in 2007-08 and the revenue deficit declined from 3.6 per cent to 1.1 per cent.
6. Investment and savings showed significant improvement. The domestic investment rate as a proportion of GDP increased from 27.6 per cent in 2003-04 to over 39 per cent in 2007-08. The gross domestic savings rate shot up from 29.8 per cent to 37.7 per cent during this period. The gross capital formation in agriculture as a proportion of agriculture GDP improved from 11.1 per cent in 2003-04 to 14.2 per cent in 2007-08.
7. The buoyant growth of Government revenues facilitated fiscal consolidation as mandated in the FRBM Act. The tax to GDP ratio increased from 9.2 per cent in 2003-04 to 12.5 per cent in 2007-08 bringing us within striking distance of the target for fiscal correction. This also enhanced our capacity to raise resources internally to finance our growth at the rate of 9 per cent per annum during the Eleventh Five Year Plan.
8. All this would not have been possible without the guidance
of UPA Chairperson, Smt. Sonia Gandhi, the inspiring leadership of Prime Minister, Dr. Manmohan Singh and the hard work put in by my predecessor, Shri P. Chidambaram.
Friday, February 6, 2009
word power made easy
Ø Repercussions—effects,impact,outcome,influence
Ø Harbinger—indication
Ø Tantamount—equal,as good as
Ø Instigate—intiate,activate
Ø Ambivalence---the presence of two opposing ideas, attitudes, or emotions at the same time,conflict of ideas or attitudes
Ø Dossier---record,folder,profile
Ø Carnage—bloodnbath,killing,
Ø Massacre—mass murder,carnage
Ø Emulate—imitate,follow
Ø Retaliate—hit back,react
Ø Complicity—responsibility,involvement,participation
Ø Horde—mass,gang,group
Ø Nurse—care for,look after
Ø Indulge—treat,spoil
Ø Covert Action-- An operation designed to influence governments, events, organizations, or persons in support of foreign policy in a manner that is not necessarily, Military maneuvers behind enemy lines are often covert actions, so that the enemy will not detect any forces in the area.
Ø Bait—temptation,attraction
Ø Intact—unbroken
Ø Hamper—slow down,obstruct
Ø Catastrophic—terrible,tragic,disastrous
Ø Conciliatory—peace making,appeasing
Ø Restraint—control,command
Ø Grave—serious
Ø Provocation—frustation,irritation
Ø Timid—shy
Ø Devoid—lacking-------completely lacking on somethong
Ø Assert—declare,emphasize
Ø Deter—prevent,frighten,put off
Ø Pursuit—hunt,chase,search
Ø Accrue—grow,increase,mount up,accumulate,add
Ø Audacious—risky,brave,impudent
Ø radicalization -- to undergo fundamental change, or introduce sweeping change in something
Ø propensity—tendency,partiality
Ø abdicate—rive up,relinquish
Ø fizzle—hiss,bubble
Ø sublime—inspiring,moving,magnificiant
Ø balsam—ointment
Ø righteousness—morality,justice
Ø virile--- relating to or having the characteristics of an adult male, howing energy, power, and forcefulness,
Ø righteous—blameless,good
Ø benevolence—kindness,compassion,generosity,goodwill
Ø paralytic—immobile
Ø alm-house
Ø thrive—succeed,florish,increase
Ø wherewithal—funds,money
Ø rhetoric—language,public speaking
Ø collude—join together
Ø clout—influence,power
Ø leverage—influnce, power, control, force
Ø auspices---backing, support, sponsorship
Ø nuke--- to attack somebody or something with nuclear weapons
Ø tartly—sharply, unkindly
Ø assault—attack
Ø Anonymity—secracy, ambiguity
Ø Détente
Ø Glimpses-- a quick or incomplete look or sighting of somebody or something, • I just caught a glimpse of her face in the crowd.
Ø Elicitation-- to cause or produce something as a reaction or response to a stimulus of some kind. Ex: His jokes failed to elicit even the faintest of smiles from her.
Ø Grim—harsh, severe, bleak
Ø Severance—separation, taking apart
Ø Deplete—reduce, diminish
Ø Bankruptcy—ruin, economic failure
Ø Danglers---swing or hang loosely, or cause something to swing or hang loosely.Ex: The children dangled their legs over the side of the swimming pool
Ø Enticement—incentive, invitation
Ø Unifies—make things into one. Ex: to bring people or things together to form a single unit or entity.
Ø Itinerary—route, journey, tour, program
Ø Plunging—dropping, reducing, falling.sinking.
Ø Spiraling—escalation,increase,growth.
Ø Diversified-- to become more varied, or make something more varied, to expand into new areas of business, or expand a commercial organization into new areas.
Ø Interim—short-term,temperory, acting.
Ø Sought—wanted, hunted, required
Ø Devolution—decentralization, deligation,transfer.
Ø Slammed—bang,crash,smash
Ø Prophets—forecasters,psychic, diviner,spiritualist.
Ø Beleaguered—struggling,harrased, stressed,under attack
Ø Perpetrating—commit, pull off,be responsible for.
Ø Severance— separation.
Ø Legitimacy—authenticity, authority
Ø Overlay—cover, place on top, superimpose, spread over the surface
Ø Positing—put something forward. Ex: to put forward for consideration something such as a suggestion, assumption, or fact
Ø Sparingly – carefully, cautiously
Ø Intricate – complicated, difficult, complex, elaborate.
Ø Hitch—drawback, delay, problem.
Ø Agnostic—disbeliever, doubter
Ø Conduits—channel for liquid, protective cover for cable, cobveyor of information (somebody or something that conveys information, especially in secret)
Ø Demarcate—separate, distinguish, isolate, segregate.
Ex: The BizTalk architecture is designed so that the processing responsibilities within the Messaging Engine are clearly demarcated.
Ø Esoteric—obscure, mysterious, impenetrable
Ø Niche—place, position, function, role.
Ø Ubiquitous—ever present, everywhere, omnipresent
Ø Permeate—fill, saturate, filter through, leak into.
Ø Perceived—apparent, supposed, seeming.
Ø Notion—idea, view, concept.
Ø Itinerary—schedule, rote, journey, program
Ø Panacea—cure, solution, answer, universal remedy.
Ø Punk-- an offensive term for a young man regarded as worthless, lazy, or arrogant, body piercing, and unconventional hairstyles, makeup, and clothing
Ø Fleet—navy, task force
Ø Scudding-- to move swiftly and smoothly
Ø Bum-- somebody regarded as irresponsible or worthless, a homeless person living on the street, useless, worthless, or of poor quality.
Ø Batboy-- in baseball, a person employed to look after the team's equipment, especially the bats
Ø Seldom—hardly ever, infrequently, rarely, not often.
Ø Dirt—mud, dust, clay, earth.
Ø Recipe—formula, guidelines, instructions, procedure, way, technique.
Ø Empower—authorize, allow, sanction, give power to.
Ø Skeptical—cynical, doubtful, disbelieving, dubious, unconvinced, incredulous.
Ø Deprecate—criticize, condemn, deplore, denounce, censure, denigrate, disapprove of
Ø Credibility –trustworthiness, reliability, authority, sincerity, standing.
Ø Ancillary—additional, secondary, supplementary
Ø Remittance—payment, allowance, transfer of fund, release, discharge.
Ø Delineate—define, outline, describe, explain
Ø Hallmark—stamp, trademark, characteristic, brand, feature, property
Ø Harbinger—indication
Ø Tantamount—equal,as good as
Ø Instigate—intiate,activate
Ø Ambivalence---the presence of two opposing ideas, attitudes, or emotions at the same time,conflict of ideas or attitudes
Ø Dossier---record,folder,profile
Ø Carnage—bloodnbath,killing,
Ø Massacre—mass murder,carnage
Ø Emulate—imitate,follow
Ø Retaliate—hit back,react
Ø Complicity—responsibility,involvement,participation
Ø Horde—mass,gang,group
Ø Nurse—care for,look after
Ø Indulge—treat,spoil
Ø Covert Action-- An operation designed to influence governments, events, organizations, or persons in support of foreign policy in a manner that is not necessarily, Military maneuvers behind enemy lines are often covert actions, so that the enemy will not detect any forces in the area.
Ø Bait—temptation,attraction
Ø Intact—unbroken
Ø Hamper—slow down,obstruct
Ø Catastrophic—terrible,tragic,disastrous
Ø Conciliatory—peace making,appeasing
Ø Restraint—control,command
Ø Grave—serious
Ø Provocation—frustation,irritation
Ø Timid—shy
Ø Devoid—lacking-------completely lacking on somethong
Ø Assert—declare,emphasize
Ø Deter—prevent,frighten,put off
Ø Pursuit—hunt,chase,search
Ø Accrue—grow,increase,mount up,accumulate,add
Ø Audacious—risky,brave,impudent
Ø radicalization -- to undergo fundamental change, or introduce sweeping change in something
Ø propensity—tendency,partiality
Ø abdicate—rive up,relinquish
Ø fizzle—hiss,bubble
Ø sublime—inspiring,moving,magnificiant
Ø balsam—ointment
Ø righteousness—morality,justice
Ø virile--- relating to or having the characteristics of an adult male, howing energy, power, and forcefulness,
Ø righteous—blameless,good
Ø benevolence—kindness,compassion,generosity,goodwill
Ø paralytic—immobile
Ø alm-house
Ø thrive—succeed,florish,increase
Ø wherewithal—funds,money
Ø rhetoric—language,public speaking
Ø collude—join together
Ø clout—influence,power
Ø leverage—influnce, power, control, force
Ø auspices---backing, support, sponsorship
Ø nuke--- to attack somebody or something with nuclear weapons
Ø tartly—sharply, unkindly
Ø assault—attack
Ø Anonymity—secracy, ambiguity
Ø Détente
Ø Glimpses-- a quick or incomplete look or sighting of somebody or something, • I just caught a glimpse of her face in the crowd.
Ø Elicitation-- to cause or produce something as a reaction or response to a stimulus of some kind. Ex: His jokes failed to elicit even the faintest of smiles from her.
Ø Grim—harsh, severe, bleak
Ø Severance—separation, taking apart
Ø Deplete—reduce, diminish
Ø Bankruptcy—ruin, economic failure
Ø Danglers---swing or hang loosely, or cause something to swing or hang loosely.Ex: The children dangled their legs over the side of the swimming pool
Ø Enticement—incentive, invitation
Ø Unifies—make things into one. Ex: to bring people or things together to form a single unit or entity.
Ø Itinerary—route, journey, tour, program
Ø Plunging—dropping, reducing, falling.sinking.
Ø Spiraling—escalation,increase,growth.
Ø Diversified-- to become more varied, or make something more varied, to expand into new areas of business, or expand a commercial organization into new areas.
Ø Interim—short-term,temperory, acting.
Ø Sought—wanted, hunted, required
Ø Devolution—decentralization, deligation,transfer.
Ø Slammed—bang,crash,smash
Ø Prophets—forecasters,psychic, diviner,spiritualist.
Ø Beleaguered—struggling,harrased, stressed,under attack
Ø Perpetrating—commit, pull off,be responsible for.
Ø Severance— separation.
Ø Legitimacy—authenticity, authority
Ø Overlay—cover, place on top, superimpose, spread over the surface
Ø Positing—put something forward. Ex: to put forward for consideration something such as a suggestion, assumption, or fact
Ø Sparingly – carefully, cautiously
Ø Intricate – complicated, difficult, complex, elaborate.
Ø Hitch—drawback, delay, problem.
Ø Agnostic—disbeliever, doubter
Ø Conduits—channel for liquid, protective cover for cable, cobveyor of information (somebody or something that conveys information, especially in secret)
Ø Demarcate—separate, distinguish, isolate, segregate.
Ex: The BizTalk architecture is designed so that the processing responsibilities within the Messaging Engine are clearly demarcated.
Ø Esoteric—obscure, mysterious, impenetrable
Ø Niche—place, position, function, role.
Ø Ubiquitous—ever present, everywhere, omnipresent
Ø Permeate—fill, saturate, filter through, leak into.
Ø Perceived—apparent, supposed, seeming.
Ø Notion—idea, view, concept.
Ø Itinerary—schedule, rote, journey, program
Ø Panacea—cure, solution, answer, universal remedy.
Ø Punk-- an offensive term for a young man regarded as worthless, lazy, or arrogant, body piercing, and unconventional hairstyles, makeup, and clothing
Ø Fleet—navy, task force
Ø Scudding-- to move swiftly and smoothly
Ø Bum-- somebody regarded as irresponsible or worthless, a homeless person living on the street, useless, worthless, or of poor quality.
Ø Batboy-- in baseball, a person employed to look after the team's equipment, especially the bats
Ø Seldom—hardly ever, infrequently, rarely, not often.
Ø Dirt—mud, dust, clay, earth.
Ø Recipe—formula, guidelines, instructions, procedure, way, technique.
Ø Empower—authorize, allow, sanction, give power to.
Ø Skeptical—cynical, doubtful, disbelieving, dubious, unconvinced, incredulous.
Ø Deprecate—criticize, condemn, deplore, denounce, censure, denigrate, disapprove of
Ø Credibility –trustworthiness, reliability, authority, sincerity, standing.
Ø Ancillary—additional, secondary, supplementary
Ø Remittance—payment, allowance, transfer of fund, release, discharge.
Ø Delineate—define, outline, describe, explain
Ø Hallmark—stamp, trademark, characteristic, brand, feature, property
Wednesday, February 4, 2009
Existing asp.net page to AJAX enabled page in Sharepoint
Adding Microsoft ASP.NET AJAX Technology to SharePoint Pages
To extend your SharePoint site with Microsoft ASP.NET AJAX 1.0, need to perform a few steps.
• First, need to download and install ASP.NET AJAX on servers
• Second, need to extend web.config with some settings to enable ASP.NET AJAX technology.
• Third, need to add the ASP.NET AJAX Script Manager into master page to enable scenarios such as Extenders or UpdatePanels.
A. Installing Microsoft ASP.NET AJAX 1.0
After installing add Reference ,System.Web.Extensions.
B. Extending SharePoint web.config files with Microsoft ASP.NET AJAX 1.0
Extending SharePoint web.config files with ASP.NET AJAX requires the some Ajax registration entries in-line with WSS registration entries. To do this we need to edit SharePoint web.config file.
1. Add aelement to the tag:
2. Add a section as a child of the / tag:
3. Add the following tag to the tag, within :
----This has come by installing AJAX
4. Add some new registrations to the end of the section:
5. Add a new registration to the HttpModules section, beneath any existing registrations:
6. Add a SafeControl entry for the System.Web.UI namespace from Microsoft Ajax Extensions, within the/section:
7. Finally, add the following configuration tags at the bottom of web.config, near the bottom before the end tag:
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
C. Adding a ScriptManager into a SharePoint MasterPage
To statically embed a script manager into a page, it is recommended that, add the ScriptManager into the master page of a site.
To do this, open up the master page for your site. Typically, this will be located at/_catalogs/masterpage. You can edit this file by opening it in an editor such as Microsoft SharePoint Designer, or directly in Notepad by opening your master page library via DAV (typically \\server\\_catalogs\masterpage.)
Add the following into the markup of your page. A recommended location is right beneath the WebPartManager registration (search for ):
D. Using UpdatePanels within SharePoint
UpdatePanels are a very useful addition to ASP.NET AJAX, and represent the simplest way to convert existing, standard ASP.NET controls and parts to take advantage of Ajax techniques. However, there are some changes within Windows SharePoint Services which may get in the way of working with ASP.NET AJAX.
Windows SharePoint Services JavaScript has onSubmit wrapper which is used to override the default form action. This work is put in place to ensure that certain types of URLs, which may contain double byte characters, will fully work across most postback and asynchronous callback scenarios. However, if your scenarios do not involve double byte character URLs, you may successful disable this workaround and gain the ability to use ASP.NET AJAX UpdatePanels.
To do this, you may need to register a client startup script which disables this workaround, in addition to resetting the default form action:
This script may be directly embedded in the page, or could be emitted by a control that uses the UpdatePanel.
E. Modify Windows SharePoint Services 3.0 scripts to change doPostBack() behavior
To modify scripts to ensure proper doPostBack() behavior
For ASP.NET controls that use the JavaScript _doPostBack() function to commit changes, a regular full-page postback event may occur even when the Web Part is inside an UpdatePanel control. Windows SharePoint Services 3.0 and ASP.NET AJAX cache certain form actions, which can cause a conflict between SharePoint and ASP.NET AJAX. To change this behavior, you must add code to scripts that are running in Windows SharePoint Services 3.0.
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;
}
}";
}
}
To extend your SharePoint site with Microsoft ASP.NET AJAX 1.0, need to perform a few steps.
• First, need to download and install ASP.NET AJAX on servers
• Second, need to extend web.config with some settings to enable ASP.NET AJAX technology.
• Third, need to add the ASP.NET AJAX Script Manager into master page to enable scenarios such as Extenders or UpdatePanels.
A. Installing Microsoft ASP.NET AJAX 1.0
After installing add Reference ,System.Web.Extensions.
B. Extending SharePoint web.config files with Microsoft ASP.NET AJAX 1.0
Extending SharePoint web.config files with ASP.NET AJAX requires the some Ajax registration entries in-line with WSS registration entries. To do this we need to edit SharePoint web.config file.
1. Add a
2. Add a
3. Add the following tag to the
4. Add some new registrations to the end of the
5. Add a new registration to the HttpModules section, beneath any existing registrations:
6. Add a SafeControl entry for the System.Web.UI namespace from Microsoft Ajax Extensions, within the
7. Finally, add the following configuration tags at the bottom of web.config, near the bottom before the end
C. Adding a ScriptManager into a SharePoint MasterPage
To statically embed a script manager into a page, it is recommended that, add the ScriptManager into the master page of a site.
To do this, open up the master page for your site. Typically, this will be located at
Add the following into the markup of your page. A recommended location is right beneath the WebPartManager registration (search for
D. Using UpdatePanels within SharePoint
UpdatePanels are a very useful addition to ASP.NET AJAX, and represent the simplest way to convert existing, standard ASP.NET controls and parts to take advantage of Ajax techniques. However, there are some changes within Windows SharePoint Services which may get in the way of working with ASP.NET AJAX.
Windows SharePoint Services JavaScript has onSubmit wrapper which is used to override the default form action. This work is put in place to ensure that certain types of URLs, which may contain double byte characters, will fully work across most postback and asynchronous callback scenarios. However, if your scenarios do not involve double byte character URLs, you may successful disable this workaround and gain the ability to use ASP.NET AJAX UpdatePanels.
To do this, you may need to register a client startup script which disables this workaround, in addition to resetting the default form action:
This script may be directly embedded in the page, or could be emitted by a control that uses the UpdatePanel.
E. Modify Windows SharePoint Services 3.0 scripts to change doPostBack() behavior
To modify scripts to ensure proper doPostBack() behavior
For ASP.NET controls that use the JavaScript _doPostBack() function to commit changes, a regular full-page postback event may occur even when the Web Part is inside an UpdatePanel control. Windows SharePoint Services 3.0 and ASP.NET AJAX cache certain form actions, which can cause a conflict between SharePoint and ASP.NET AJAX. To change this behavior, you must add code to scripts that are running in Windows SharePoint Services 3.0.
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;
}
}";
}
}
Monday, December 10, 2007
error logging
InstrumentationHelper.LogError(INSTRUMENTATION_SOURCE, "Exception during ->event name", handled exception)
Friday, November 16, 2007
Open a file with corresponding Editor
If dsAttachmentData.Tables(0).Rows.Count > 0 Then
Response.Clear()
Dim strFileExt As String() = dsAttachmentData.Tables(0).Rows(0)("ATCHT_FILE_NM").ToString().ToUpper().Trim().Split(".")
If strFileExt(1) = "DOC" Then
Response.ContentType = "application/msword"
Else If strFileExt(1) = "XLS" Then
Response.ContentType = "application/vnd.ms-excel"
ElseIf strFileExt(1) = "PDF" Then
Response.ContentType = "application/pdf"
ElseIf strFileExt(1) = "TXT" Then
Response.ContentType = "text/HTML"
Response.ContentType = "text/plain"
End If
Dim strRecdFileName As String = dsAttachmentData.Tables(0).Rows(0) ("ATCHT_FILE_NM").ToString()
Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", strRecdFileName))
Dim fileContent As Byte() = CType(dsAttachmentData.Tables(0).Rows(0)("ATCHT_CNTNT"), Byte())
Response.OutputStream.Write(fileContent, 0, fileContent.Length)
Response.End()
End If
Response.Clear()
Dim strFileExt As String() = dsAttachmentData.Tables(0).Rows(0)("ATCHT_FILE_NM").ToString().ToUpper().Trim().Split(".")
If strFileExt(1) = "DOC" Then
Response.ContentType = "application/msword"
Else If strFileExt(1) = "XLS" Then
Response.ContentType = "application/vnd.ms-excel"
ElseIf strFileExt(1) = "PDF" Then
Response.ContentType = "application/pdf"
ElseIf strFileExt(1) = "TXT" Then
Response.ContentType = "text/HTML"
Response.ContentType = "text/plain"
End If
Dim strRecdFileName As String = dsAttachmentData.Tables(0).Rows(0) ("ATCHT_FILE_NM").ToString()
Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", strRecdFileName))
Dim fileContent As Byte() = CType(dsAttachmentData.Tables(0).Rows(0)("ATCHT_CNTNT"), Byte())
Response.OutputStream.Write(fileContent, 0, fileContent.Length)
Response.End()
End If
Thursday, November 1, 2007
Google Search Tips
1. Either/or.Google normally searches for pages that contain all the words you type in the search box, but if you want pages that have one term or another (or both),
use the OR operator — or use the "" symbol (pipe symbol) to save you a keystroke. [dumb little man]
2. Quotes.If you want to search for an exact phrase, use quotes. ["dumb little man"] will only find that exact phrase. [dumb "little man"] will find pages that contain the word dumb and the exact phrase "little man".
3. Not.If you don't want a term or phrase, use the "-" symbol. [-dumb little man] will return pages that contain "little" and "man" but that don't contain "dumb".
4. Similar terms. Use the "~" symbol to return similar terms. [~dumb little man -dumb] will get you pages that contain "funny little man" and "stupid little man" but not "dumb little man".
5. Wildcard.The "*" symbol is a wildcard. This is useful if you're trying to find the lyrics to a song, but can't remember the exact lyrics. [can't * me love lyrics] will return the Beatles song you're looking for. It's also useful for finding stuff only in certain domains, such as educational information: ["dumb little man" research *.edu].
6. Advanced search.If you can't remember any of these operators, you can always use Google's advanced search.
7. Definitions. Use the "define:" operator to get a quick definition. [define:dumb] will give you a whole host of definitions from different sources, with links.
8. Calculator.One of the handiest uses of Google, type in a quick calculation in the search box and get an answer. It's faster than calling up your computer's calculator in most cases. Use the +, -, *, / symbols and parentheses to do a simple equation.
9. Numrange. This little-known feature searches for a range of numbers. For example, ["best books 2002..2007] will return lists of best books for each of the years from 2002 to 2007 (note the two periods between the two numbers).
10. Site-specific.Use the "site:" operator to search only within a certain website. [site: dumblittleman.com leo] will search for the term "leo" only within this blog.
11. Backlinks.The "link:" operator will find pages that link to a specific URL. You can use this not only for a main URL but even to a specific page. Not all links to an URL are listed, however.
12. Vertical search. Instead of searching for a term across all pages on the web, search within a specialized field. Google has a number of specific searches, allowing you to search within blogs, news, books, and much more:
· Blog Search
· Book Search
· Scholar
· Catalogs
· Code Search
· Directory
· Finance
· Images
· Local/Maps
· News
· Patent Search
· Product Search
· Video
13. Movies.Use the "movie:" operator to search for a movie title along with either a zip code or U.S. city and state to get a list of movie theaters in the area and show times.
14. Music.The "music:" operator returns content related to music only.
15. Unit converter.Use Google for a quick conversion, from yards to meters for example, or different currency: [12 meters in yards]
16. Types of numbers:Google algorithms can recognize patterns in numbers you enter, so you can search for:* Telephone area codes* Vehicle ID number (US only)
* Federal Communications Commission (FCC) equipment numbers (US only)
* UPC codes* Federal Aviation Administration (FAA) airplane registration number (US only) * Patent numbers (US only)* Even stock quotes (using the stock symbol) or a weather forecast regarding the next five days
17. File types.If you just want to search for .PDF files, or Word documents, or Excel spreadsheets, for example, use the "filetype:" operator.
18. Location of term.By default, Google searches for your term throughout a web page. But if you just want it to search certain locations, you can use operators such as "inurl:", "intitle:", "intext:", and "inanchor:". Those search for a term only within the URL, the title, the body text, and the anchor text (the text used to describe a link).
19. Cached pages.Looking for a version of a page the Google stores on its own servers? This can help with outdated or update pages. Use the "cached:" operator.
20. Answer to life, the universe, and everything. Search for that phrase, in lower case, and Google will give you the answer.
use the OR operator — or use the "" symbol (pipe symbol) to save you a keystroke. [dumb little man]
2. Quotes.If you want to search for an exact phrase, use quotes. ["dumb little man"] will only find that exact phrase. [dumb "little man"] will find pages that contain the word dumb and the exact phrase "little man".
3. Not.If you don't want a term or phrase, use the "-" symbol. [-dumb little man] will return pages that contain "little" and "man" but that don't contain "dumb".
4. Similar terms. Use the "~" symbol to return similar terms. [~dumb little man -dumb] will get you pages that contain "funny little man" and "stupid little man" but not "dumb little man".
5. Wildcard.The "*" symbol is a wildcard. This is useful if you're trying to find the lyrics to a song, but can't remember the exact lyrics. [can't * me love lyrics] will return the Beatles song you're looking for. It's also useful for finding stuff only in certain domains, such as educational information: ["dumb little man" research *.edu].
6. Advanced search.If you can't remember any of these operators, you can always use Google's advanced search.
7. Definitions. Use the "define:" operator to get a quick definition. [define:dumb] will give you a whole host of definitions from different sources, with links.
8. Calculator.One of the handiest uses of Google, type in a quick calculation in the search box and get an answer. It's faster than calling up your computer's calculator in most cases. Use the +, -, *, / symbols and parentheses to do a simple equation.
9. Numrange. This little-known feature searches for a range of numbers. For example, ["best books 2002..2007] will return lists of best books for each of the years from 2002 to 2007 (note the two periods between the two numbers).
10. Site-specific.Use the "site:" operator to search only within a certain website. [site: dumblittleman.com leo] will search for the term "leo" only within this blog.
11. Backlinks.The "link:" operator will find pages that link to a specific URL. You can use this not only for a main URL but even to a specific page. Not all links to an URL are listed, however.
12. Vertical search. Instead of searching for a term across all pages on the web, search within a specialized field. Google has a number of specific searches, allowing you to search within blogs, news, books, and much more:
· Blog Search
· Book Search
· Scholar
· Catalogs
· Code Search
· Directory
· Finance
· Images
· Local/Maps
· News
· Patent Search
· Product Search
· Video
13. Movies.Use the "movie:" operator to search for a movie title along with either a zip code or U.S. city and state to get a list of movie theaters in the area and show times.
14. Music.The "music:" operator returns content related to music only.
15. Unit converter.Use Google for a quick conversion, from yards to meters for example, or different currency: [12 meters in yards]
16. Types of numbers:Google algorithms can recognize patterns in numbers you enter, so you can search for:* Telephone area codes* Vehicle ID number (US only)
* Federal Communications Commission (FCC) equipment numbers (US only)
* UPC codes* Federal Aviation Administration (FAA) airplane registration number (US only) * Patent numbers (US only)* Even stock quotes (using the stock symbol) or a weather forecast regarding the next five days
17. File types.If you just want to search for .PDF files, or Word documents, or Excel spreadsheets, for example, use the "filetype:" operator.
18. Location of term.By default, Google searches for your term throughout a web page. But if you just want it to search certain locations, you can use operators such as "inurl:", "intitle:", "intext:", and "inanchor:". Those search for a term only within the URL, the title, the body text, and the anchor text (the text used to describe a link).
19. Cached pages.Looking for a version of a page the Google stores on its own servers? This can help with outdated or update pages. Use the "cached:" operator.
20. Answer to life, the universe, and everything. Search for that phrase, in lower case, and Google will give you the answer.
Subscribe to:
Posts (Atom)