Context.Response.Write("<script type='text/javascript'>window.frameElement.commitPopup()</script>");
Context.Response.Flush();
Context.Response.End();
Context.Response.Flush();
Context.Response.End();
public string GenerateQuery(IList<CamlQueryElements> lstOfElement)
{
StringBuilder queryJoin = new StringBuilder();
string query = @"<{0}><FieldRef Name='{1}' /><Value {2} Type='{3}'>{4}</Value></Eq>";
if (lstOfElement.Count > 0)
{
int itemCount = 0;
foreach (CamlQueryElements element in lstOfElement)
{
itemCount++;
string date = string.Empty;
// Display only Date
if (String.Compare(element.FieldType, "DateTime", true) == 0)
date = "IncludeTimeValue='false'";
queryJoin.AppendFormat(string.Format(query, element.ComparisonOperators,
element.FieldName, date, element.FieldType, element.FieldValue));
if (itemCount >= 2)
{
queryJoin.Insert(0, string.Format("<{0}>", element.LogicalJoin));
queryJoin.Append(string.Format("</{0}>", element.LogicalJoin));
}
}
queryJoin.Insert(0, "<Where>");
queryJoin.Append("</Where>");
}
return queryJoin.ToString();
}
source: https://stackoverflow.com/questions/8267515/dynamically-create-caml-query?rq=1
ClientContext clientContext = new ClientContext("url");List listInstance = clientContext.Web.Lists.GetByTitle("list name");ListItem item = listInstance .GetItemById(list id);clientContext.Load(item);FieldUserValue userValue = item["user type field internal name"] as FieldUserValue;clientContext.ExecuteQuery();string username = userValue.LookupValue.ToSTring();
----------------------------------------------------------------------------------------------------------source: https://social.technet.microsoft.com/Forums/Windows/en-US/3d367e58-91ec-4547-8e55-f1635eaec5bf/how-to-get-value-from-people-picker-field-using-c-in-sharepoint-2010?forum=sharepointdevelopmentprevious
<asp:Chart ID="ChartFarmProfile" runat="server" Width="450px"><Series><asp:Series Name="Series3"></asp:Series></Series><ChartAreas><asp:ChartArea Name="ChartArea3"><AxisX><MajorGrid Enabled="False" /></AxisX><AxisY><MajorGrid Enabled="False" /></AxisY></asp:ChartArea></ChartAreas></asp:Chart>
if (DtPlotCrop.Rows.Count > 0) { DataView dv = DtPlotCrop.Rows[0].Table.DefaultView; ChartCropProfile.Series["Series3"].Points.DataBindXY(dv, "Crop_Name", dv, "CropArea"); ChartCropProfile.Series["Series3"].ChartType = SeriesChartType.Pie; ChartCropProfile.Series["Series3"]["PointWidth"] = "0.5"; ChartCropProfile.Series["Series3"].IsValueShownAsLabel = true; ChartCropProfile.Series["Series3"].Label = "#VALY " + DtPlotCrop.Rows[0]["Unit"]; ChartCropProfile.Series["Series3"]["BarLabelStyle"] = "Center"; ChartCropProfile.ChartAreas["ChartArea3"].Area3DStyle.Enable3D = true; ChartCropProfile.Series["Series3"]["DrawingStyle"] = "Cylinder"; ChartCropProfile.Series["Series3"]["LineColor"] = "Black"; ChartCropProfile.Series["Series3"]["LabelStyle"] = "Outside"; ChartCropProfile.Series["Series3"].ToolTip = "#VALX (#VALY " + DtPlotCrop.Rows[0]["Unit"] + ")"+ "#PERCENT"; ChartCropProfile.Series["Series3"].BackGradientStyle = GradientStyle.DiagonalLeft; ChartCropProfile.Series["Series3"].BackSecondaryColor = System.Drawing.Color.LightGray; ChartCropProfile.Legends.Add(new Legend("Profile")); ChartCropProfile.Legends["Profile"].Title = "Crop Name (Area)"; ChartCropProfile.Series[0].LegendText = "#VALX (#VALY " + DtPlotCrop.Rows[0]["Unit"] + ")"; ChartCropProfile.Legends[0].TableStyle = LegendTableStyle.Wide; ChartCropProfile.Legends[0].Docking = Docking.Bottom; }
HOW TO RECOVER THE SQL DATABASE FROM SUSPECT MODE (Or) HOW TO BRING BACK THE SUSPECTED DATABASE TO THE NORMAL MODE When you logi...