Khalid Abbas

Total Ranking points:685

Top Questions

6 Cannot evaluate expression because the code of the current method is optimized

6 setting up listing and detail widgets on the same page sitefinity, having issue of opening details on both widgets

6 How to dynamically generate sitemap xml for an mvc website?

6 NuGet Package restore failed/build failed for my project on new visual studio instance

5 Getting the error "Server does not support secure connections" while sending emails by using c#

5 System.Net.Mail.SmtpException: Transaction failed. The server response was: Rejected - Message containing bare LF's.

5 how to check for null value while rendering my html using mustache.js ?

4 how to stop google from indexing specific pages of my site?

4 Saved user, password appearing in wrong fields even autocomplete=off is not working in mvc5?

4 What is the purpose of each Sitecore's core, master, and web databases?

Top Answers

4 Due to some reasons the list widget doesn't implement an override of the HandleUnknown action. (The code for that list controller is here: link ) You need to add similar method as shown in the following code which will return the index action to the code in the given link. /// <summary> /// Called when a request matches this controller, but no method with the specified action name is found in the controller. /// </summary> /// <param name="actionName">The name of the attempted action.</param> protected override void HandleUnknownAction(string actionName) { this.ActionInvoker.InvokeAction(this.ControllerContext, "Index"); } and after adding the above method in the code, update the "Telerik.Sitefinity.Frontend.Lists.dll" to your project.

3 The easiest way I found for the purpose is by import repository feature. You need to perform following steps to import your GitLab repository to GitHub. 1) Just create a fresh repository on your GitHub. 2)Go to that repository page on GitHub and find the import code option which is at the bottom of your empty repository. 3)By click on the import code option you will be asked for Your old repository’s clone URL (The repository you have on GitLab) 4)Once you import you will be asked for your GitLab credentials as well. Now it will inform you by email once the import is finished. Note: Make sure your both accounts on GitHub and GitLab should have proper access rights required for the purpose.

3 Hi junaid, I understood your issues your first issue is an encoding issue for which you just need to update "csvEncoding" in that code and add "%EF%BB%BF" which will solve your first issue, now about your second issue it is due to an usual behavior of csv files, which displays large numbers in that exponential value,For a workaround to solve that you need to append '\u200C' character to specifically to your mobile number field or you can add '\u200C' (as it is an empty character so it will not effect any value, it will just display them as string) character to all your fields if you want to display them all as string. so after making these updates your code will be updated as follows. /** @namespace Converts JSON to CSV. Compress with: */ (function (window) { "use strict"; /** Default constructor */ var _CSV = function (JSONData) { if (typeof JSONData === 'undefined') return; var csvData = typeof JSONData != 'object' ? JSON.parse(settings.JSONData) : JSONData, csvHeaders, csvEncoding = 'data:text/csv;charset=utf-8,%EF%BB%BF', csvOutput = "", csvRows = [], BREAK = '\r\n', DELIMITER = ',', FILENAME = "export.csv"; // Get and Write the headers csvHeaders = Object.keys(csvData[0]); csvOutput += csvHeaders.join(',') + BREAK; for (var i = 0; i < csvData.length; i++) { var rowElements = []; for(var k = 0; k < csvHeaders.length; k++) { rowElements.push('\u200C' +csvData[i][csvHeaders[k]]); } // Write the row array based on the headers csvRows.push(rowElements.join(DELIMITER)); } csvOutput += csvRows.join(BREAK); // Initiate Download var a = document.createElement("a"); if (navigator.msSaveBlob) { // IE10 navigator.msSaveBlob(new Blob([csvOutput], { type: "text/csv" }), FILENAME); } else if ('download' in a) { //html5 A[download] a.href = csvEncoding + encodeURIComponent(csvOutput); = FILENAME; document.body.appendChild(a); setTimeout(function() {; document.body.removeChild(a); }, 66); } else if (document.execCommand) { // Other version of IE var oWin ="about:blank", "_blank"); oWin.document.write(csvOutput); oWin.document.close(); oWin.document.execCommand('SaveAs', true, FILENAME); oWin.close(); } else { alert("Support for your specific browser hasn't been created yet, please check back later."); } }; window.CSVExport = _CSV; })(window);

3 you can fix this by using the group policy settings changes described below to set the state to ‘Vulnerable’ to allow RDP access. 1- Open Group Policy Editor, by executing gpedit.msc 2- Path to the policy need to update : Computer Configuration -> Administrative Templates -> System -> Credentials Delegation 3- Edit "Encryption Oracle Remediation" (which will be appearing in the right panel when click on "Credentials Delegation" ) 4- Select Enabled and change Production Level to Vulnerable 5- Run the command gpupdate /force to apply group policy settings.(In command prompt) Your remote desktop connection will be working fine now.

3 There is an option available in sitecore backend to control the sort order or display order of individual field or field section as per your liking, for the purpose you need to select the specific field or field section for which you want to change the order and click on " view " tab from the top navigation then check the " Standard Fields " checkbox then there is a " Sortorder " property against the field or the field section by default it has the value 100 but you can change it. for example set it as -100 and it will be on top.

3 Actually some sitefinity services are getting blocked on your iis level, so you need to add a handler mapping for those sitefinity services. A well explained solution available on following Link .

3 Actually some characters like comma and semicolon should not be used inside the cookie value which used as separators for cookies. And in your case a simple solution could be to replace "," with "%2C" and replace ";" with "%3B" before setting it as cookie value and perform vise versa when retrieving the value to get actual string. for example: value = value.replace(",", "%2C").replace(";", "%3B");

3 Typically, the following are allowed: -300 cookies in total -4096 bytes per cookie -20 cookies per domain -81920 bytes per domain -Given 20 cookies of max size 4096 = 81920 bytes. Although it may vary for different browsers for details you can visit following link

2 you can convert int? to int by using the Value property of Nullable int, you can consider following example let say your controller method taking nullable int as input parameter so you can use recordId as int in your inner method as shown. public ActionResult YourControllerMethod(int? Id) { //following line will set 0 if the Id is null otherwise it will set the value into recordId int recordId = Id == null ? 0 : Id.Value; // Here you can simply use the recordId in your inner method as int Records.GetbyId(recordId); }

2 Abstract Class: -Declared with abstract keyword -This class is primarily created as a Inheritable class. An abstract class enables other classes to inherit from this class, but forbids to instantiate. That means one can inherit from an abstract class but cannot create object of an abstract class. -Abstract class can have abstract as well as non-abstract methods. Abstract methods are those which are not having method definition. -Should be used when there is a IS-A relationship and no instances should be allowed to be created from that abstract class. Example: An Animal is an abstract base class where specific animals can be derived from, i.e. Tiger, Cat etc. By making Animal abstract it is not allowed to create an Animal instance. Static Class: -Declared with Static keyword -Methods in Static Class are also static along with variables of the class. -This class cannot be instantiated, i.e we cannot have objects of this class. -To access methods of this class, you can directly use classname.methodname. -This class cannot be inherited. -Mostly used for 'utility' functions. Suppose you need some method to calculate the average of some numbers to be used in the Tiger class, but you don't want to put that in Tiger since it is unrelated and it also is not related to Animal, you can create a class to have this kind of methods. You don't need an instance of such a utility class. Sealed Class: -Declared with Sealed keyword -This class basically seal all its variables, methods and properties. Which means no other class can inherit anything from this class or in other words, this class cannot be inherited. -But we can instantiate this class, i.e we can have any number of objects of a sealed class. -By making Tiger sealed, it is not possible to inherit from it, e.g. making classes like Siberian tiger or Bengal Tiger which you like to be inheriting from Tiger.

Top Tags Created


2 Search engine indexing

1 Sitemap

1 mustache.js

Top Tags Used

21 C#

19 Asp.Net


10 CMS

7 Sitefinity

6 JavaScript


5 JQuery

4 IIS (Internet Information Services)

4 Microsoft Visual Studio