Another Salesforce blog!!!

Salesforce, Apex

ASP.NET

Lifecycle Hooks in Mounting Phase in LWC – Parent/Child

Life Cycle Parent Component: Life Cycle Child Component: Favorite

Template Looping in LWC

Favorite

PageReference redirecting from the Visualforce page

if you are passing any parameters then you would use this:

If you want to add more parameters, you can add them in between the square brackets.

Favorite

How to get RecordType Id

Favorite

Check to see whether the file in a url Exists or Not

You can use HttpWebRequest. Note four things 1) The webRequest will throw exception if the link doesn’t exist 2) You may like to disable auto redirect 3) You may also like to check if it’s a valid url. If not, it will throw UriFormatException. 4) Per Paige suggested , Use “Head” in request.Method so that […]

Extract substring from a string until finds a comma c# asp.net

substring = str.Split(‘,’)[0]; or You can use IndexOf() to find out where is the comma, and then extract the substring. If you are sure it will always have the comma you can skip the check.

or

or

Favorite

Convert foreach loop to Linq code

Converting this code to Linq: string[] selections = “Men,Women,Boys”.Split(‘,’); int _chkboxId = 0; int _chkboxTextId = 1; try { string id = “lstchk_” + _chkboxId; while (!driver.FindElement(By.Id(id)).Equals(null)) { string checkboxId = String.Format(“lstchk{0}”, _chkboxTextId); string checkboxName = driver.FindElement(By.Id(checkboxId)).Text; foreach (string match in selections) { if (checkboxName == match.Trim()) { //matched… do more work here… } } […]

Check-All checkbox using GridView (asp.net)

Favorite

How to grab the text inside the TextBox in ASP.NET using jQuery

   var _comment = $(“#[id*=’commentEdit’]”).val();  <asp:TextBox runat=”server” ID=”txtNewComments”  MaxLength=”300″ TextMode=”MultiLine” Rows=”7″ Width=”100%”></asp:TextBox> Favorite

How to restrict the user to allow only one checkbox of each checked? (ASP.NET)

<%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”chkbox_checked_uncheked.aspx.cs”     Inherits=”Ediable_Repeater.chkbox_checked_uncheked” %> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“> <html xmlns=”http://www.w3.org/1999/xhtml“> <head runat=”server”>     <title></title>     <script src=”Scripts/jquery-1.6.2.min.js” type=”text/javascript”></script>     <script type=”text/javascript”>         $(document).ready(function () {             $(‘#C1All’).click(function () {                 $(‘.col1 > input’).attr(“checked”, $(‘#C1All’).attr(“checked”));                 $(‘.col2 > input’).removeAttr(“checked”);                 $(‘#C2All’).removeAttr(“checked”);             });             $(‘#C2All’).click(function () {                 […]

Previous Posts