Tuesday, February 23, 2010
Friday, February 19, 2010
Portal Listings : migration nightmare from Sharepoint 2003 to 2007
- Open the page in SharePoint Designer
- Insert a Data View in a web part zone
- Add a new data connection by connecting to the portal listing
- You can change the UI, make it link to documents and have all the fun
Monday, January 18, 2010
SharePoint element styles: a good link
Tuesday, December 29, 2009
asp.net email +Transaction failed. The server response was: Sending address not accepted due to spam filter
"Sending address not accepted due to spam filter"
To resolve this just pass the network credentials for a user and it will work.
Tuesday, December 15, 2009
FileUpload control does not work in Update Panel : solution
All file upload controls (includes asp, telerik, componentart, component factory and others) does not working in any AJAX update panels. This means if your upload control located in an update panel, control does not post the file. If you look to the posted file property of the control, you will see it null.
This is a limitation comes from the XmlHttpRequest component, used in all AJAX frameworks for asynchronous calls to the application. In order to upload a file you should perform a full page postback.
The solution is to add a Triggers tag:
<asp:UpdatePanel ID="upFileUpload" runat="server" >
<Triggers>
<asp:PostBackTrigger ControlID="btnUpload" />
</Triggers>
<ContentTemplate > .....
</ContentTemplate>
</asp:UpdatePanel>
See it work like a charm!!
Saturday, December 5, 2009
Issue with the ajax tab panel
In case your AJAX Tabs are not rendered properly and you get white line/space then quick fix will be to define the height of Tabs.
Define the following CSS below and reference in your TabContainer and things will work well .
<style type="text/css">
.ajax__tab_xp .ajax__tab_tab
{
height: 21px;
}
</style>
Wednesday, November 18, 2009
SharePoint : Setting List column values
string strSiteCollPath = "your Site Collection path";
using (SPSite siteCollection = new SPSite(strSiteCollPath))
{
using (SPWeb siteWeb = siteCollection.OpenWeb())
{
SPList lstPayment = siteWeb.Lists["XYZ"];
SPList lstInvoiceSummary = siteWeb.Lists["ABC"];
foreach (SPItem item in lstInvoiceSummary.Items)
{
string strDocNumber = item["documentNumber"].ToString();
SPQuery query = new SPQuery();
query.Query = "your SPQuery";
SPListItemCollection coll = lstPayment.GetItems(query);
int count = coll.Count;
if (count > 0)
{
item["Has Payment"] = "Yes";
item.Update();
}
else
{
item["Has Payment"] = "No";
item.Update();
}
}
}
}