<head runat="server">
<title>Untitled Page</title>
<script>
function PopupModal ()
{
var modal = $find('modalPopupExtender1');
if (modal)
{
if (modal.show)
{
modal.show();
}
else
{
alert("nope!");
}
}
else
{
throw modal;
}
}
function onOk()
{
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" ID="ScriptManager1" EnablePageMethods="true" LoadScriptsBeforeUI="true"> </asp:ScriptManager>
<asp:Button ID="button1" runat="server" Text="Server_Click" OnClick="button1_Click" />
<asp:Button ID="buttonNull" style="display:none;" runat="server" />
<asp:UpdatePanel ID="updPanel1" runat='server'></asp:UpdatePanel>
<asp:Panel runat="server" ID="Panel1" Width="500" Height="500" style="display:none;"
BackColor="#fafad2" BorderColor="black" BorderStyle="solid" BorderWidth="1px">
<asp:panel runat="server" ID="Panel3" Width="100%" Height="27" BackColor="red">
DragHandle
</asp:panel>
<asp:Button ID="OKButton" runat="server"/>
<asp:button ID="CancelButton" runat="server" />
</asp:Panel>
<cc1:ModalPopupExtender ID="ModalPopupExtender" runat="server"
BehaviorID="modalPopupExtender1"
TargetControlID="buttonNull"
PopupControlID="Panel1"
BackgroundCssClass="modalBackground"
OkControlID="OkButton"
OnOkScript="onOk()"
CancelControlID="CancelButton"
DropShadow="true"
PopupDragHandleControlID="Panel3" />
Here is the code behind:
protected void button1_Click(object sender, EventArgs e)
{
//Do stuff
ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowPopup", "window.setTimeout('PopupModal()',50);", true);
}
Monday, August 24, 2009
Thursday, August 20, 2009
SharePoint 2010 Key Features
http://www.codeproject.com/KB/sharepoint/SharePoint_2010.aspx
Sharepoint 2010 has following new features
- Better support for Internet facing sites
- More security features & flexibility in managing permissions
- Email management for users
- Faster search
- More storage options such as SAN, NAS, RAID etc. (currently only SQL)
- Improved taxonomy management
- Better Dashboards and reports
- Records and archiving policies
- Easy to use templates
- More commands
- Microsoft Groove is renamed as ‘SharePoint Workspace Manager’
- Integration with other CMS products
- Improved infopath form capabilities
- More workflow types
- Native support for Mozilla Firefox 3.0 and Opera
- Better support for Mobile devices
- Easy migration from SPS2003 and MOSS 2007
- Snapshot Backup and Restore
- Granular recovery at item level
Monday, July 20, 2009
Hiding the Search Box When Printing
* Open the master page in SharePoint Designer
* Add the following style either to a CSS file included in the master page or as a style within the master page itself:
@media print{
.HideForPrinting
{
display:none;
}
}
* Locate the delegate control used to display the search box and add the code shown in italics:
<asp:ContentPlaceHolder id=”PlaceHolderSearchArea” runat=”server”>
<span class=”HideForPrinting”>
<SharePoint:DelegateControl runat=”server” ControlId=”SmallSearchInputBox”/>
</span>
</asp:ContentPlaceHolder>
This defines a span that uses the style HideForPriting, the content of which will be hidden when the page is printed.
* Add the following style either to a CSS file included in the master page or as a style within the master page itself:
@media print{
.HideForPrinting
{
display:none;
}
}
* Locate the delegate control used to display the search box and add the code shown in italics:
<asp:ContentPlaceHolder id=”PlaceHolderSearchArea” runat=”server”>
<span class=”HideForPrinting”>
<SharePoint:DelegateControl runat=”server” ControlId=”SmallSearchInputBox”/>
</span>
</asp:ContentPlaceHolder>
This defines a span that uses the style HideForPriting, the content of which will be hidden when the page is printed.
Change size of Rich Text Editing Control
When using the rich text column type in SharePoint lists the edit control has a fixed width of 384 pixels. This is often too small for easy editing.
If you need to change the width for a single form, open the form in SharePoint Designer and add a style defining ms-rtelong at the top of the content place holder in which the form is displayed with new dimensions, e.g.
<asp:Content ContentPlaceHolderId=”PlaceHolderMain” runat=”server”>
<style type=”text/css”>
.ms-rtelong {
width:700px;
height:600px;
}
</style>
If you need to change the width for a single form, open the form in SharePoint Designer and add a style defining ms-rtelong at the top of the content place holder in which the form is displayed with new dimensions, e.g.
<asp:Content ContentPlaceHolderId=”PlaceHolderMain” runat=”server”>
<style type=”text/css”>
.ms-rtelong {
width:700px;
height:600px;
}
</style>
Tuesday, July 14, 2009
How to access inetpub root folder using programatically in sharepoint
Here i have mentioned how to access inetpub root folder using object model.
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
string filename = web.Site.WebApplication.IisSettings[SPUrlZone.Default].Path.FullName.ToString() + @"\_app_bin\layouts.sitemap";
it will give filename like "C:\Inetpub\wwwroot\wss\VirtualDirectories\5858\_app_bin\layouts.sitemap"
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
string filename = web.Site.WebApplication.IisSettings[SPUrlZone.Default].Path.FullName.ToString() + @"\_app_bin\layouts.sitemap";
it will give filename like "C:\Inetpub\wwwroot\wss\VirtualDirectories\5858\_app_bin\layouts.sitemap"
Subscribe to:
Posts (Atom)