These days i got a chance to work on real cool stuff using AJAX control Toolkit, i used Tab Panel,CollapsiblePanelExtender and also Bing Maps AJAX Control, Version6.3. .
You will be seeing some more stuff on my blog in comming weeks on these controls, for now i would like to share something about TabPanel.
Below code will display list of data in one tab and Map on other Tab, based on search performed in previous page.
For this i used Design time to work with Tabcontainer and 2 Tab panels, check the below sample, if you need any more details leave a comment
<asp:toolkitscriptmanager id="ToolkitScriptManager1" runat="server" enablepagemethods="true">
</asp:toolkitscriptmanager>
<asp:tabcontainer id="TabContainer1" runat="server" activetabindex="1" cssclass="ajax__tab_xp"
autopostback="true" onactivetabchanged="TabContainer1_ActiveTabChanged" width="100%"
onclientactivetabchanged="LoadMap">
<asp:TabPanel runat="server" HeaderText="List View" ID="tbpanleList" TabIndex="0">
<HeaderTemplate>
List View
</HeaderTemplate>
<ContentTemplate>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="False">
<ContentTemplate>
<!--Display the results here using Grid/Table-->
</ContentTemplate>
<Triggers>
<!--- Place any events for implementing callback using update panle defined above , this update panel will be for this Tab Panel--->
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</asp:TabPanel>
<asp:TabPanel ID="tbpanleMapView" HeaderText="Map View" runat="server" TabIndex="1">
<HeaderTemplate>
Map View
</HeaderTemplate>
<ContentTemplate>
<div style="position: relative; width: 700px; height: 450px;" id="mapDiv" " />
</div>
<br />
</ContentTemplate>
</asp:TabPanel>
</asp:tabcontainer>
:)
Monday, December 6, 2010
Friday, September 3, 2010
Parse XML and store to DataTable
Parse the xml results and store data to Datatable.Below a Method will Display Data in Lables using result DataTable when URL is passed.
public void DisplaySearchResults(string URL)
{
XmlDocument myXMLDocument = null;
DataRow drDetails;
string ID;
string Title;
string Desc;
Label lblErrorMessage= new Label();
DataTable dtSearchResults = new DataTable();
try
{
myXMLDocument = new XmlDocument();
myXMLDocument.Load(URL);
XmlNodeList objNodeList = myXMLDocument.SelectNodes("Root/Child1/);
DataColumn dcID = new DataColumn("ID", typeof(string));
DataColumn dcTitle = new DataColumn("Title", typeof(string));
DataColumn dcDesc= new DataColumn("Description", typeof(string));
dtSearchResults.Columns.Add(dcID);
dtSearchResults.Columns.Add(dcTitle);
dtSearchResults.Columns.Add(dcDesc);
foreach (XmlNode hitNode in objNodeList)
{
drDetails = dtSearchResults.NewRow();
ID = hitNode.SelectSingleNode("FIELD[@NAME='id']").InnerText;
drDetails["ID"] = ID;
Title = hitNode.SelectSingleNode("FIELD[@NAME='title']").InnerText;
drDetails["Title"] = Title;
Desc = hitNode.SelectSingleNode("FIELD[@NAME='desc']").InnerText;
drDetails["Description"] = Desc;
dtSearchResults.Rows.Add(drDetails);
dtSearchResults.AcceptChanges();
}
TableRow row;
TableCell cell1;
TableRow rowbody;
TableCell cell2;
Label lblTitle;
Label lblbodytext;
lblErrorMessage.Text = "";
if (dtSearchResults.Rows.Count > 0)
{
for (int i = 0; i < dtSearchResults.Rows.Count; i++)
{
row = new TableRow();
rowbody = new TableRow();
cell1 = new TableCell();
cell2 = new TableCell();
lblTitle = new Label();
lblTitle.Text = dtSearchResults.Rows[i]["Title"].ToString();
cell1.Controls.Add(lblTitle);
lblbodytext = new Label();
lblbodytext.Text = dtSearchResults.Rows[i]["Description"].ToString();
cell2.Controls.Add(lblbodytext);
row.Cells.Add(cell1);
rowbody.Cells.Add(cell2);
tblsearchresults.Rows.Add(row);
tblsearchresults.Rows.Add(rowbody);
}
}
else
{
lblErrorMessage.Text = "No search results were found. Please try again";
}
Define a asp table in your ASPX page like below
This is basic solution, you can also do paging of xml result set like Google or Bing.
If this solution helped anyone Please leave a comment.
Enjoy Coding :)
public void DisplaySearchResults(string URL)
{
XmlDocument myXMLDocument = null;
DataRow drDetails;
string ID;
string Title;
string Desc;
Label lblErrorMessage= new Label();
DataTable dtSearchResults = new DataTable();
try
{
myXMLDocument = new XmlDocument();
myXMLDocument.Load(URL);
XmlNodeList objNodeList = myXMLDocument.SelectNodes("Root/Child1/);
DataColumn dcID = new DataColumn("ID", typeof(string));
DataColumn dcTitle = new DataColumn("Title", typeof(string));
DataColumn dcDesc= new DataColumn("Description", typeof(string));
dtSearchResults.Columns.Add(dcID);
dtSearchResults.Columns.Add(dcTitle);
dtSearchResults.Columns.Add(dcDesc);
foreach (XmlNode hitNode in objNodeList)
{
drDetails = dtSearchResults.NewRow();
ID = hitNode.SelectSingleNode("FIELD[@NAME='id']").InnerText;
drDetails["ID"] = ID;
Title = hitNode.SelectSingleNode("FIELD[@NAME='title']").InnerText;
drDetails["Title"] = Title;
Desc = hitNode.SelectSingleNode("FIELD[@NAME='desc']").InnerText;
drDetails["Description"] = Desc;
dtSearchResults.Rows.Add(drDetails);
dtSearchResults.AcceptChanges();
}
TableRow row;
TableCell cell1;
TableRow rowbody;
TableCell cell2;
Label lblTitle;
Label lblbodytext;
lblErrorMessage.Text = "";
if (dtSearchResults.Rows.Count > 0)
{
for (int i = 0; i < dtSearchResults.Rows.Count; i++)
{
row = new TableRow();
rowbody = new TableRow();
cell1 = new TableCell();
cell2 = new TableCell();
lblTitle = new Label();
lblTitle.Text = dtSearchResults.Rows[i]["Title"].ToString();
cell1.Controls.Add(lblTitle);
lblbodytext = new Label();
lblbodytext.Text = dtSearchResults.Rows[i]["Description"].ToString();
cell2.Controls.Add(lblbodytext);
row.Cells.Add(cell1);
rowbody.Cells.Add(cell2);
tblsearchresults.Rows.Add(row);
tblsearchresults.Rows.Add(rowbody);
}
}
else
{
lblErrorMessage.Text = "No search results were found. Please try again";
}
Define a asp table in your ASPX page like below
This is basic solution, you can also do paging of xml result set like Google or Bing.
If this solution helped anyone Please leave a comment.
Enjoy Coding :)
Tuesday, August 10, 2010
SharePoint Server 2007 vs. 2010 Feature Comparison Matrix
Microsoft SharePoint Server 2010- You may have noticed that the 'Office' part of the name has dropped out. The reason being is that the “Office” brand will no longer include Server side components (such as SharePoint).
To know more about sharepoint 2010 check the below article that gives a comparison matrix between MOSS2007 and Sharepoint 2010.
http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=4
Have fun
To know more about sharepoint 2010 check the below article that gives a comparison matrix between MOSS2007 and Sharepoint 2010.
http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=4
Have fun
Free videos on sharepoint2010(Evaluation only)
Some Free videos on sharepoint2010(Evaluation only not full videos)
http://www.point8020.com/SharePointEndUserTraining.aspx.
Getting Started with SharePoint Server 2010 for IT Pros-http://technet.microsoft.com/en-us/sharepoint/ee518660.aspx
Hope it helps for Know-How of SharePoint 2010.
Have Fun
http://www.point8020.com/SharePointEndUserTraining.aspx.
Getting Started with SharePoint Server 2010 for IT Pros-http://technet.microsoft.com/en-us/sharepoint/ee518660.aspx
Hope it helps for Know-How of SharePoint 2010.
Have Fun
Monday, May 3, 2010
Display Breadcrumbs Trail in a simple way
Here is very crisp and short way of implementing Breadcrumb for ASP.net Website.
Create a Link for Home,link for primary link and if you have secondary link and a label to display page user enterd.
HyperlinkHome>[hyperlink1]>>[hyperlink2]>[lblPageName].
Create 3 properties for Primarylink1 and secondarylink(if any) and for label.
public string primarylinkpagecode{ get; set; }
public string primarylinkpageText { get; set; }
public string SecondarylinkpagecodeCode { get; set; }
public string SecondarylinkpageText { get; set; }
public string PageTitle { get; set; }
The page's which are going to utilize this breadcrumb should pass the respective values to the above properties.
Ex:
Home>Cameras>Sony>Sony cybershot
UCBreadCrum.Link1Code = Cameras;
UCBreadCrum.LinkText = Cameras;
UCBreadCrum.Link2Code = Sony;
UCBreadCrum.Link2Text = Sony;
UCBreadCrum.Title = Sony Cybershot;
If you have any static pages and want to implement breadcrumbs below are value and properites to be passed.
1.Breadcrumb for a static
Home>Company
Link2Code="static"
Link2Text="Company"
2.If you want to display breadcrumb trial as
Home>Company>About us the
Link2Code="static"
Link2Text="Company"
Title="About uS"
And Keep the URL for Company in web.cofig and make sure the Like2TExt(Company) and web.config key name should be same(Even same case) .
below sample code for Displaying Breadcrumb for static page.
if (Link2Code == "static")
{
lbl1.Visible = true;
lbl2.Visible = false;
lbl3.Visible = true;
hlHome.Visible = true;
hlHome.Text = "Home";
hlHome.NavigateUrl = "../Forms/Index.aspx";
hlLink2.Text = " " + Linke2Text + " ";
hlLink2.Visible = true;
lblName.Text = " " + Title;
lblName.Visible = true;
hlLink2.NavigateUrl = System.Configuration.ConfigurationManager.AppSettings[Linke2Text];
}
If you need more information on implementing breadcrumb for dynamic content pages like any detail pages ,let me know.
Happy coding
Create a Link for Home,link for primary link and if you have secondary link and a label to display page user enterd.
HyperlinkHome>[hyperlink1]>>[hyperlink2]>[lblPageName].
Create 3 properties for Primarylink1 and secondarylink(if any) and for label.
public string primarylinkpagecode{ get; set; }
public string primarylinkpageText { get; set; }
public string SecondarylinkpagecodeCode { get; set; }
public string SecondarylinkpageText { get; set; }
public string PageTitle { get; set; }
The page's which are going to utilize this breadcrumb should pass the respective values to the above properties.
Ex:
Home>Cameras>Sony>Sony cybershot
UCBreadCrum.Link1Code = Cameras;
UCBreadCrum.LinkText = Cameras;
UCBreadCrum.Link2Code = Sony;
UCBreadCrum.Link2Text = Sony;
UCBreadCrum.Title = Sony Cybershot;
If you have any static pages and want to implement breadcrumbs below are value and properites to be passed.
1.Breadcrumb for a static
Home>Company
Link2Code="static"
Link2Text="Company"
2.If you want to display breadcrumb trial as
Home>Company>About us the
Link2Code="static"
Link2Text="Company"
Title="About uS"
And Keep the URL for Company in web.cofig and make sure the Like2TExt(Company) and web.config key name should be same(Even same case) .
below sample code for Displaying Breadcrumb for static page.
if (Link2Code == "static")
{
lbl1.Visible = true;
lbl2.Visible = false;
lbl3.Visible = true;
hlHome.Visible = true;
hlHome.Text = "Home";
hlHome.NavigateUrl = "../Forms/Index.aspx";
hlLink2.Text = " " + Linke2Text + " ";
hlLink2.Visible = true;
lblName.Text = " " + Title;
lblName.Visible = true;
hlLink2.NavigateUrl = System.Configuration.ConfigurationManager.AppSettings[Linke2Text];
}
If you need more information on implementing breadcrumb for dynamic content pages like any detail pages ,let me know.
Happy coding
Wednesday, November 4, 2009
Downloadable content for Office SharePoint Server 2007
Some of the content in the Microsoft Office SharePoint Server 2007 technical library is available in downloadable and printable form as Microsoft Office Word documents (.doc files). The content in these books is a copy of selected content in the Office SharePoint Server technical library http://go.microsoft.com/fwlink/?LinkId=84739 as of the date listed for each book. For the most current content, see the technical library on the Web.
A list of newly published content for Office SharePoint Server 2007 are available at below link :http://technet.microsoft.com/en-us/library/cc262788.aspx
In this article:
Getting Started
Planning
Deployment
Operations
Security
Solutions
Exlpore MOSS :)
A list of newly published content for Office SharePoint Server 2007 are available at below link :http://technet.microsoft.com/en-us/library/cc262788.aspx
In this article:
Getting Started
Planning
Deployment
Operations
Security
Solutions
Exlpore MOSS :)
Steps to get a Google search on your site
Do you want to add Google search to your MOSS Site

Below are some simple steps to get a Google search on your site:
1. Navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS
2. Create a new folder called "external"
3. Inside the folder create a single HTML page with the following contents:

4. Save the file as "googlesearch.htm"
5. Go to your MOSS Site
6. Drop Page Viewer Web Part, Add the url to the page using Link in the properties of the web part will be http://<>/_layouts/external/google.htm
Below are some simple steps to get a Google search on your site:
1. Navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS
2. Create a new folder called "external"
3. Inside the folder create a single HTML page with the following contents:
4. Save the file as "googlesearch.htm"
5. Go to your MOSS Site
6. Drop Page Viewer Web Part, Add the url to the page using Link in the properties of the web part will be http://<
Subscribe to:
Posts (Atom)