Friday, February 11, 2011
Capture a value in a custom control in a child page (inside a master page) using ASP.Net validators
Most of the times we want to achieve consistency between pages. Then mostly we create a master page and keep the web pages consistence. In these pages sometime we use our custom controls (like a custom calendar control).
If you want to check using a required field validator whether the calendar control has been filled before clicking on the save button, there is no easy way of getting this done. This is because of the master page the fields name is getting replaced. However you can get this done using the following code snippet. You need to add this to the onload event of the web page.
//Getting the content place holder
ContentPlaceHolder content = (ContentPlaceHolder)Page.Master.FindControl("ContentPlaceHolder1");
//Finding the textbox using the previously found content place holder
TextBox txt = (TextBox)content.FindControl("CalendarControl1TextBox");
//Assigning the required field validator
RequiredFieldValidator1.ControlToValidate = txt.ID;
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...
There is a bit of change in CRM 2011 than CRM 4. The code is below. Microsoft.Xrm.Sdk. EntityReference Moniker1 = new Microsoft.Xrm.S...
When you create a new security role from scratch and then assign only that role to a system user and when you log to the CRM site you might ...
Error message “User does not have send-as privilege.” when sending emails programmatically in CRM 2011We were working on sending emails programmatically using CRM and all were working fine. Suddenly we got this error when we tried to send an ...