Please refer this link which describes all important configuration details in SharePoint
http://www.datasprings.com/Resources/ArticlesInformation/OverviewonInstallingSharepoint2007.aspx
Tuesday, September 7, 2010
Monday, September 6, 2010
Modal popup in SharePoint 2010
The following code example will describe you how to open modalpopup in sharepoint 2010.
step1) write down script for modal popup
step2)Use that script in your link as onclick
New Support Request/Feedback
step1) write down script for modal popup
step2)Use that script in your link as onclick
New Support Request/Feedback
Tuesday, August 31, 2010
How to stop page refreshing in asp.net
step1)Declare variable
private bool _refreshState;
private bool _isRefresh;
step2)Add below code into your .cs file or load the below two methods
protected override void LoadViewState(object savedState)
{
object[] AllStates = (object[])savedState;
base.LoadViewState(AllStates[0]);
_refreshState = Convert.ToBoolean(AllStates[1].ToString());
_isRefresh = (_refreshState == Convert.ToBoolean(Session["__ISREFRESH"].ToString()));
}
protected override object SaveViewState()
{
Session["__ISREFRESH"] = _refreshState;
object[] AllStates = new object[3];
AllStates[0] = base.SaveViewState();
AllStates[1] = !(_refreshState);
return AllStates;
}
step3) add code to your button
if (!(_isRefresh))
{
code
}
private bool _refreshState;
private bool _isRefresh;
step2)Add below code into your .cs file or load the below two methods
protected override void LoadViewState(object savedState)
{
object[] AllStates = (object[])savedState;
base.LoadViewState(AllStates[0]);
_refreshState = Convert.ToBoolean(AllStates[1].ToString());
_isRefresh = (_refreshState == Convert.ToBoolean(Session["__ISREFRESH"].ToString()));
}
protected override object SaveViewState()
{
Session["__ISREFRESH"] = _refreshState;
object[] AllStates = new object[3];
AllStates[0] = base.SaveViewState();
AllStates[1] = !(_refreshState);
return AllStates;
}
step3) add code to your button
if (!(_isRefresh))
{
code
}
Wednesday, May 12, 2010
How to Filter Data in gridview Depending upon selection of dropdown box
I have three drop down box like ProjName,CustName and SOOwner
step 1: First Check condition for All three Drop Down
tempdt = (DataTable) ViewState["DataTable"]; // tempdt is datatable
finaldt = tempdt.Clone(); // finaldt is datatable
string ProjName = null;
string CustName = null;
string SOOwner = null;
ProjName = ddlProjName.SelectedValue;
CustName = ddlCustName.SelectedValue;
SOOwner = ddlSOOwner.SelectedValue;
if (ProjName != "" && CustName != "" && SOOwner != "")
{
string query = "ProjectName='" + ProjName + "'and SO_Owner='" + SOOwner + "' and CustomerName='" + CustName + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (ProjName != "" && CustName != "")
{
string query = "ProjectName='" + ProjName + "'and CustomerName='" + CustName + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (CustName != "" && SOOwner != "")
{
string query = "CustomerName='" + CustName + "'and SO_Owner='" + SOOwner + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (ProjName != "" && SOOwner != "")
{
string query = "ProjectName='" + ProjName + "'and SO_Owner='" + SOOwner + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (ProjName != "")
{
string query = "ProjectName='" + ProjName + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (CustName != "")
{
string query = "CustomerName='" + CustName + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (SOOwner != "")
{
string query = "SO_Owner='" + SOOwner + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
this.ViewState["filterDt"] = finaldt;
gv1.Visible = true;
//gv1.DataSource = finaldt;
gv1.DataSource = finaldt;
gv1.DataBind();
}
step 1: First Check condition for All three Drop Down
tempdt = (DataTable) ViewState["DataTable"]; // tempdt is datatable
finaldt = tempdt.Clone(); // finaldt is datatable
string ProjName = null;
string CustName = null;
string SOOwner = null;
ProjName = ddlProjName.SelectedValue;
CustName = ddlCustName.SelectedValue;
SOOwner = ddlSOOwner.SelectedValue;
if (ProjName != "" && CustName != "" && SOOwner != "")
{
string query = "ProjectName='" + ProjName + "'and SO_Owner='" + SOOwner + "' and CustomerName='" + CustName + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (ProjName != "" && CustName != "")
{
string query = "ProjectName='" + ProjName + "'and CustomerName='" + CustName + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (CustName != "" && SOOwner != "")
{
string query = "CustomerName='" + CustName + "'and SO_Owner='" + SOOwner + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (ProjName != "" && SOOwner != "")
{
string query = "ProjectName='" + ProjName + "'and SO_Owner='" + SOOwner + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (ProjName != "")
{
string query = "ProjectName='" + ProjName + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (CustName != "")
{
string query = "CustomerName='" + CustName + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
else if (SOOwner != "")
{
string query = "SO_Owner='" + SOOwner + "'";
DataRow[] row = tempdt.Select(query);
for (int i = 0; i <= row.GetUpperBound(0); i++)
{
finaldt.ImportRow(row[i]);
}
}
this.ViewState["filterDt"] = finaldt;
gv1.Visible = true;
//gv1.DataSource = finaldt;
gv1.DataSource = finaldt;
gv1.DataBind();
}
How To Display Text Or LanId Into People Picker Control
Hi Guys
Now I am Explaining How To Display LanId Into peopleEntity Control at a time of Page Load
Steps :
Create PickerEntity object and assign user name to key propertie of PickerEntity :
PickerEntity entity = new PickerEntity();
entity.Key = user.LoginName;
Also Create ArrayList For updating PeopleEntity Like this:
ArrayList entityArrayList = new ArrayList();
entityArrayList.Add(entity);
pd1.UpdateEntities(entityArrayList);
Like This O/p U can See
Now I am Explaining How To Display LanId Into peopleEntity Control at a time of Page Load
Steps :
Create PickerEntity object and assign user name to key propertie of PickerEntity :
PickerEntity entity = new PickerEntity();
entity.Key = user.LoginName;
Also Create ArrayList For updating PeopleEntity Like this:
ArrayList entityArrayList = new ArrayList();
entityArrayList.Add(entity);
pd1.UpdateEntities(entityArrayList);
Like This O/p U can See
Wednesday, May 5, 2010
How to access control from another user control in Asp.Net page
Hi ,
Create new website and add two .ascx pages .
Write coding for both user control and drag that user controls on default page.
Enter Below Code into ControlA.ascx page in source mode::
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlA.ascx.cs" Inherits="ControlA" %>
Enter Below Code into ControlA.ascx.cs file
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class ControlA : System.Web.UI.UserControl
{
string settext;
public string text
{
//get
//{
// return TextBox1.Text;
//}
set
{
TextBox1.Text = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
Create second User Control add button control to it::
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlB.ascx.cs" Inherits="ControlB" %>
<%@ Reference VirtualPath="~/ControlA.ascx" %>
After Click on Button call page.findcontrol method & get respected output::
public partial class ControlB : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e) {
}
protected void Button1_Click(object sender, EventArgs e) {
ControlA FirstUserControl = (ControlA)Page.FindControl("ControlA1");
FirstUserControl.text = "Hi";
}}
And The two control are communicating with each other
Create new website and add two .ascx pages .
Write coding for both user control and drag that user controls on default page.
Enter Below Code into ControlA.ascx page in source mode::
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlA.ascx.cs" Inherits="ControlA" %>
Enter Below Code into ControlA.ascx.cs file
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class ControlA : System.Web.UI.UserControl
{
string settext;
public string text
{
//get
//{
// return TextBox1.Text;
//}
set
{
TextBox1.Text = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
Create second User Control add button control to it::
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlB.ascx.cs" Inherits="ControlB" %>
<%@ Reference VirtualPath="~/ControlA.ascx" %>
After Click on Button call page.findcontrol method & get respected output::
public partial class ControlB : System.Web.UI.UserControl
And The two control are communicating with each other
Subscribe to:
Posts (Atom)