Karan's Blog
Just Microsoft .Net
-
Getting value from appsettings.json in .net core
Using C# & .net Core 2.0 the below code would get the value from app settings.
-
jQuery Watermark
This simple to use jQuery plugin adds watermark capability to a textbox. You can download this jQuery plugin from the following link: http://code.google.com/p/jquery-watermark/
-
jQuery AutoComplete
In this post I would show how to use jQuery AutoComplete plug-in. Auto-complete takes input from the user, and returns a list of words that match the users input.
-
Calendar Extender Today’s Date
The following is a simple code to show how to set/highlight the selected date in a Calendar Extender as Today’s Date. I am using JavaScript to set the Calendar’s date. Here is the code:
-
Controls in Modal Pop Extender Causing Postback
Last week someone came up with a problem of a button on a modal pop up extender causing a postback and thereby hiding the modal up itself. Consider the situation where you have some asp.net controls on a modal pop up say a Texbox, Label, and a button control. Onclick of the button you want to display the message on the label. What happens is when you click the button it causes the postback thereby causing your modal popup to hide.
-
Calling Server Side Method Using jQuery/Ajax
With this post I would show how to call server side method from client side. Here we will use jQuery to utilize the Ajax Capabilities which will help us to get/post data to/from server Asynchronously. There are many methods available to perform an async callback to the server. Here I will show a simple example as in how to call a code behind Webmethod.
-
Parse an XML file
The following code shows a simple method of parsing through an XML file/string. We can get the parent name, child name, attributes etc from the XML. The namespace System.Xml would be the only additional namespace that we would be using.
-
Asp.net Session State Revisited
Every now and then I see doubts and queries which I believe is the most discussed topic in the .net environment - Asp.net Sessions. So what really are they, why are they needed and what does browser and .net do with it. These and some of the other questions I hope to answer with this post.
-
Proper casing of the strings
Many a times we are required to show strings with proper casings. The TextInfo property from System.Globalization provides culture-specific casing information for strings. This has the advantage that it is culture aware and thus can be used for any country specific culture. This is how you would use it.