Posts

Showing posts from September, 2014
GridView must be placed inside a form tag with runat=“server” even after the GridView is within a form tag Solution : You are calling GridView.RenderControl(htmlTextWriter), hence the page raises an exception that a Server-Control was rendered outside of a Form. add this code public override void VerifyRenderingInServerForm(Control control) { return; }
Access querystring values in code behind .net c# Solution : string value = GetValueFromQueryString("name", Request.QueryString); private string GetValueFromQueryString(string key, NameValueCollection queryString) { return queryString[key]; }
Metalogix Exception thrown: Server was unable to process request. ---> Value does not fall within the expected range. Solution : Look for app pool .Is posible reset iis .
Metalogix Exception thrown: Server was unable to process request. ---> Exception from HRESULT: 0x80131904 ---> Exception from HRESULT: 0x80131904 Solution: Check for sql server space . Check if you content db is out of space. Check if the cache of sql is cleared . Check if the read and write permissions are allowed on this sql db .
Sharepoint 2013 Get Items from a list CSOM : Soltion : using (ClientContext ctx = new ClientContext("https://xyz/sites/abc")) {     Web web = ctx.Web;     List list = web.Lists.GetById(new Guid("12345-56655-2sdfgsrg-345235-23ddcs444"));     var q = new CamlQuery() { ViewXml = "<View><Query><Where><IsNotNull><FieldRef Name='ID' /></IsNotNull></Where></Query></View>"};     var r = list.GetItems(q);     ctx.Load(r);     ctx.ExecuteQuery();                 } in the above example we are retiving list values where id is not null . After retriving the list values you can assign this var type result to ineumerable to perform linq or any other data formating,filtering  operations EX:   IEnumerable<ListItem> lc = r.ToList();
How to  Get column item from ienumerable list Solution:   IEnumerable<ListItem> lc = r.ToList();  var Items = (from p in lc                                                where (p["Issue_x0020_Type"].ToString().Trim()) == "Closed"                                                group p by DateTime.Parse( p["Create_x0020_Date"].ToString() ).Month                                                 into g                                                select new { month = g.Key, count = g.Count...
get Month name from number C# .net Solution : int monthnumber=2; string monthName=CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(monthnumber);
LINQ get items count by month  from list Solution :  var ItemsDetails = (from p in lc                                              where (p["Issue_x0020_Type"].ToString().Trim()) == "Open"                                              group p by DateTime.Parse(p["Create_x0020_Date"].ToString()).Month                                                into g                                              select new { month = g.Key, count = g.Count() }); Access items Linq with for loop .  foreach (var listItem in...
Server was unable to process request. ---> Value does not fall within the expected range Solution : complete configuring alternate access mapping as http://site.xyz.com as internet zone and reconnected in sharepoint designer 2010, my problem was solved.
Metalogix sql error:40  network error . Solution: That connection error is caused by either: 1) Content Matrix not being able able to locate the SQL Server on the network (try to ping the SQL Server by name to verify name resolution). 2) Permissions. The account being used to connect must have minimum Read access to the source content database.  retry your connection.
Metalogix : Paste list gredyed out . / not available . solution: its the problem with the lisence key you need to contact with metalogix to get it working .
Metalogix : Exception thrown: Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown. Solution : check your app pool of webfrontend . restar iis and it will free up th pool and metalogics can communivcate with sharepoint . \restart iis from cmd prompt with command :  IISReset