No path is too difficult. No destination is too far !
Ashish Sehajpal
This user hasn't shared any biographical information
Homepage: http://www.sehajpal.com
Posts by Ashish Sehajpal
How to change calendar icon in telerik asp.net control
Mar 14th
It was very hard to find a work around to solve this problem as there was nothing helpful available on internet.
Just use the following line of code inside calendar tag i.e. before this line </radcln:raddatepicker>.
<DatePopupButton ImageUrl=”~/RadControls/Calendar/Skins/myStyle/Img/datePickerPopup.gif” HoverImageUrl=”~/RadControls/Calendar/Skins/myStyle/Img/datePickerPopupHover.gif” />
How to remove dotted line from HTML link, check box and radio buttons
Mar 14th
Please add the following CSS Styles in your default style sheet or add under style tag in head of the page.
input[type="checkbox"]{ outline: none; }
a{text-decoration: none; outline: 0; }
Graceful Degrading to HTML or ASP.Net page
Feb 4th
Have you ever wonder how Microsoft checks if the Silverlight plugin is not unstalled on your your system then the default ASP.Net website should appear otherwise new Silverlight website must be presented ?
here is the trick called Graceful Degrading
In case no Silverlight plugin has been installed on client’s machine, just present asp.net or HTML version of your page in the Silverlight Tag of your ASP.Net host page.
<asp:Silverlight ID=”xamlApp” runat=”server” Source=”~/ClientBin/SLApp.xap”
MinimumVersion=”2.0.31005.0″>
<PluginNotInstalledTemplate>
<div id=”someHTML” >
<!– Some HTML website code or ASP.Net webpage code –>
</div>
</PluginNotInstalledTemplate>
</asp:Silverlight>
Milk for breakfast cuts lunch!
Jan 26th

Drinking fat free milk instead of a fruit drink at breakfast helps you feel fuller and eat less at lunchtime, according to a new study.
During the study, Australian researchers found that drinking fat free milk in the morning helped increase satiety, or a feeling of fullness, and led to decreased calorie intake at the next meal, as compared with a fruit drink.
The milk drinkers ate about 50 fewer calories (or nearly 9 percent less food) at lunch.
In the study, 34 overweight but otherwise healthy men and women participated in two testing sessions – one in which they were served about 20 ounces of fat free milk, and one in which they were served the same amount of a fruit drink (both beverages contributed about 250 calories to the breakfast meal).
During the four hours between breakfast and lunch, the men and women gauged their feelings of fullness and were allowed to eat until comfortably full at lunch.
The researchers found that the milk-drinking adults reported feeling fuller, more satisfied and therefore ate fewer calories at lunch.
The researchers suspect that milk’s protein content, the lactose or simply the thickness of the beverage may play a role in the satiety benefits.
Choosing foods that can help enhance satiety is an important success factor in any weight management plan, the researchers suggest.
The study has been published in the July issue of the American Journal of Clinical Nutrition.
IPL responsible for Australia’s decline: Miandad
Jan 11th
KARACHI: Former Pakistan captain Javed Miandad has blamed the Indian Premier League (IPL) for Australia’s stunning downfall saying the money-spinning Twenty20 league has left their top cricketers completely distracted.
Miandad’s advice to international stars, especially from Australia, is to think twice before falling in the ‘cash trap’ again.
The Aussies, who till last year seemed to be almost invincible, have come crashing down following their woeful Ashes campaign. Australia lost the Ashes contest at home 1-3 and slumped to fifth place in the Test rankings.
“I believe Australia’s slump has a lot to do with their players’ association with the IPL,” Miandad was quoted as saying by The News in an interview Tuesday.
“Most of their top players got a bit too distracted because of the big cash thrown at them by the IPL. They even started ignoring national duty which has really caused their downfall,” he said.
Miandad is of the view that top players like Glen McGrath, Shane Warne and Adam Gilchrist retired from Test cricket before their time so that they could earn the IPL millions.
“All of that has really hurt the Australians, who I am sure would have not slumped like this if their players had resisted the temptation to earn big bucks that was used to lure them by the IPL.”
Launched in 2008, IPL revolutionised cricket as it splashed big cash for a high-octane blend of international star players and celebrity glamour.
Though cricketers have mostly welcomed it worldwide, critics continue to warn that the league, which has been hit by allegations of corruption, could affect the health of the more traditional formats of the game – Tests and One-day Internationals.
“It certainly will,” said Miandad.
“There is too much disparity when it comes to pays and if proper steps are not taken then top players will continue to put this league above international cricket.”
How to convert from IEnumerable to EntitySet to get Entity back in action
Nov 27th
One way of achieving is to use what most google search results find on web i.e.
public static EntitySet<T> ToEntitySet<T> (this IEnumerable<T> source) where T : class
{
var es = new EntitySet<T> ();
es.AddRange (source);
return es;
}
Then you could write your query as follows:
var questions = from q in e.Element(“Questions”).Elements(“Question”)
select new Question
{
Text = q.Attribute(“title”).Value,
Point = (decimal) q.Attribute(“point”),
Choices = (
from c in q.Elements(“Choices”).Elements(“Choice”)
select new Choice
{
Text = c.Attribute(“title”).Value,
Correct = (bool) c.Attribute(“isCorrect”)
}
).ToEntitySet();
};
But to achieve this, one may need to add reference to System.Data.Linq and even then there are sometimes when you don’t find the solution, in cases where only one Entity is required.
A very simple and effective trick for a work around of this problem is to use the following :
var FirstQuestion = Questions.Where(q=>q.ID==someIDParameter).ToList().FirstorDefault();
Now use this and do the work peacefully.
Received Spot Award from Zensar
Nov 21st
On Friday, 19th November 2010, I have been awarded a Spot Award from Zensar for the best perfromance in the quarter. Feeling good abut this
7 Popular Food Myths Busted
Nov 9th

7 popular food myths busted
Do you run away from foods like bananas, potatoes and rice? Are you worried they will make you fat, may raise your blood sugar levels or affect your health in some other way? Don’t avoid them completely. You might be depriving your body of some essential nutrients. We bust myths about foods that are most commonly considered unhealthy
Egg Yolks
Have you been conveniently throwing away egg yolks and having only the whites because you thought it is full of cholesterol? According to nutritionist Sushila Sharangdhar, the yolk is the most nutritious part of the egg. “Most of us don’t understand that our body needs a healthy amount of good cholesterol,” Sushila says. The yolks are also a good source of zinc phosphorus, Vitamins A, D, E, K, B6, B12 and folate
Rice
Rice is one of the most misunderstood foods. It is high in energy, and so it is a good idea to include it in your diet. “Rice when had for lunch, in the right quantity, is very healthy, says Mumbai-based nutritionist Tripti Gupta Bhandari. One does not have to avoid this low-fat, zero cholesterol cereal. But, if you are diabetic, keep a check on your rice intake.
Nuts
Nuts are believed to be fattening by many. They are high in calories. But, can be a part of a healthy diet if the right quantity is consumed. “Nuts are a source of omega-3 fatty acids (the good fats), specially for vegetarians. They are also a good source of proteins and minerals and should be consumed in small portions,” says nutritionist Naini Setalvad. “A fistful of nuts, say about 15gms of nuts everyday won’t do you any harm” adds Tripti. So, include a few in your morning cereal or simply snack on a handful of them.
Red Meat
Red meat when eaten in large amounts can lead to health problems. But, one does not have to avoid it completely. It is a good source of minerals like iron, zinc and protein. “Red meat is a great source of iron and right amounts of it can help overcome anaemia,” says Tripti. While having red meat, choose cuts that are low in fat like lamb chops and beef steak. “People who have high cholesterol levels should stay away from red meat,” says dietician Sushila Sharangdhar.
Potatoes
Potatoes have been considered to be fattening by most of us. But again, if the right quantity is consumed, it is a good source of energy and protein. “They are a good source of dietary fibre, Vitamins B and C, Tripti says. The way you cook them makes a difference. “Opt for boiled or roasted potatoes over fried ones,” she says.
Bananas
Most people on a weight loss diet avoid bananas because of its high sugar content. But again, they need not be avoided completely as they contain no fat and are a good source of essential vitamins and minerals and is a heart friendly food. “Bananas are high in potassium and are recommended for women going through menopause or to ease menstrual cramps. It serves as an excellent pre-work out meal and helps you replenish your energy. However, green bananas are best avoided if you are diabetic,” says Tripti
Ghee
Ghee is considered to be bad for the heart as it is high in saturated fatty acids and cholesterol. But, the good news is, that it is high in Vitamin A and are high in monounsaturated fatty acids which increases levels of good cholesterol. Ghee contains less fat than butter and therefore is a healthy alternative. “People tend to avoid ghee and oil because they are considered fattening. But, our body needs a healthy amount of fat. So, include 3-4 teaspoons of ghee in your diet everyday for the monounsaturated fats,” says nutritionist Sneha Trivedi
Include all foods in your diet in moderation for a healthy, balanced diet. Are there any food myths you know of? Leave us a comment and let us know.
How to solve LoadFromRemoteSources error in VS 2010
Oct 20th
I was facing an issue during the migration of my silverlight application to Visual Studio 2010. The issue was something like there are some references into the application from the network shared folder. When compiling the application there was a weird error saying :
The “ValidateXaml” task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly ‘file://\\xxxxxxxx\Assemblies\xxxxx.dll’ or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0×80131515)
File name: ‘file://\\xxxxxxxx\Assemblies\xxxxx.dll’ —> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
Navigating the microsoft link for this problem, it is bit confusing that we have to add the LoadFromRemoteSources switch to some app.config file or web.config file !! So here is the process to accomplish the task and get rid of thsi ridiculous error:-
- Goto this path in your windows explorer :
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE - Open the devenv.exe.config file in notepad or any editor of your choice.
- Search for this element closing tag in the file:
</runtime> - Before this element closing tag, Copy and paste the below configuration switch
<loadFromRemoteSources enabled=”true“/> - Save and close the config file
- It’s done !!
Australia – Players prove they are hooligans
Oct 15th
Australians have proved that they are the hooligans of first degree. They don’t have the blood running in veins but VENOM indeed. See the report from Times Of India mentioned below and it is crystal clear that Australians are nothing more than a over-rated gentlemen. read the Original Article here.
NEW DELHI: At the top of the medal tally and the undisputed champions of the Commonwealth Games, the Australian team, sadly didn’t show any sporting spirit when their cricket team lost the Test series to India on Wednesday.
Enraged by the humiliating loss, some athletes, according to highly-placed sources in Delhi Police, went berserk, destroying electrical fittings and furniture in their tower in the Games Village on Tuesday and Wednesday.
Not just that, policemen posted there say they also shouted slogans against batting maestro Sachin Tendulkar, who played a pivotal role in ensuring India’s victory in the Bangalore match, and flung a washing machine down from the eighth floor of their tower.
Their hooliganism started on Tuesday when Sachin scored a double century. “The house-keeping staff tried to stop them but to no avail,” said a senior police officer handling security inside the Village. Stunned by the little master’s stellar performance, they first damaged electrical fittings and fixtures in their block.
On Wednesday, when India brownwashed Australia 2-0 to keep the Border-Gavaskar Trophy, the Australian athletes reportedly threw a washing machine down from the eighth floor, said a senior officer. Mercifully, no one was injured.
Delhi Police, which received a complaint about this vandalism, tried to downplay the incidents to prevent them from snowballing into a diplomatic embarrassment for Australia.
On reports that some Australian athletes went berserk inside the Games Village after their cricket team lost the Test series to India, a senior officer posted there said that they have not received any complaints from Organising Committee (OC) which owns the property inside the Games Village. “Therefore, we have not registered any case,” said a senior police officer.
Police spokesperson Rajan Bhagat said: “No complaint has been received. We have found a broken washing machine from the block where the athletes were staying. We are trying to establish as to how the machine reached there.”
OC officials didn’t pursue the matter. “We have not given any complaint and the matter has been sorted out after discussion with the Australian chef-de-mission,” said an official. When asked whether the Australian athletes have tendered any apology, he declined any comment.