Mindblown: a blog about philosophy.
-
DataTable to json – Using DataTable data to display table using jQuery AJAX in ASP.Net:
In many cases, we use DataTable to fill the data from the database and we want to show this data to users in table format. If user clicks a button, we need to show the data in DataTable using jQuery Ajax. See below picture. Sidenote: We are using Production.Product of AdventureWorks database. Complete code is…
-
Get selected text and value from Drop Down List in ASP.Net using jQuery
You want to get the selected text and value from DropDownList control of ASP.Net using jQuery. Sidenote: Complete code is available at the bottom of the article. But I recommend you to read the article completely for better understanding. Every item in the drop down list has 2 parameters – Text and Value. In the…
-
AutoComplete TextBox using jQuery in ASP.Net – Querying Database Complete Example
Autocomplete is the technique of showing only the relevant information to the users based on the input by the users. You use Google rite? Even Google search uses autocomplete feature. See the below screenshot. Now, our objective is to autocomplete the textbox based on the user’s input. We would use the data entered by…
-
Show or Hide div (any control/item) when checkbox is checked or unchecked in ASP.Net using jQuery:
You want to show the item (this item could be any html element or ASP.Net Server control), if the checkbox is checked. If it’s not checked, you want the item should be made hidden. In the below screenshot, if the user selects the checkbox (if she is a US Citizen), the web application shows text…
-
How to change GridView row color based on a column value using jQuery?
You want to change GridView row color based on column value using jQuery. In the below Gridview, rows whose Reorder Point value(3rd column) less than 400 are highlighted with lavender color. SideNote: I have used Production.Product table of AdventureWorks database(which comes with SQL Express 2012) for this example. Few Facts First: Before arriving at the logic…
-
How to set the radio button selected value using jQuery in RadioButtonList?
You want to set the radio button selected value of RadioButtonList using jQuery. Before discussing on how to achieve the same, we would see some of the facts about RadioButtonList. In a typical usage of getting gender information from the user, you would use RadioButtonList like below in your aspx page. Above ASP.Net RadioButtonList Server…
-
How to get/set the value of a session variable using javascript/jQuery?
You wanna set the session value using javascript/jQuery. Or you would like to get the session value in javascript/jQuery. There is a little problem here. Javascript, used for manipulation of web documents, works only at browser end – as it resides at client Side. But Session is a server side state management technique whose context…
-
Calling ASP.Net Code Behind using jQuery AJAX – A Simple Complete Example
Ajax (Asynchronous Javascript And XML) is a technique of sending the request to the server and receiving the response from the server without reloading the entire page. Consider a scenario where you have many Fields in your Web Form and you want to populate Field2 based on Field1 value. It would be overkill if you…
-
How to prevent double clicking or multiple Form submission after the ASP.Net Button is clicked?
Below picture shows the typical flow when an ASP.Net Web Form is submitted by the user. You want to prevent double clicking or submitting the form multiple times after the ASP.Net Button is clicked so that same data should not be stored more than once. We want to prevent multiple form submission at step 1…
-
How to get the id of any ASP.Net server control using javascript or jQuery
If you want to select a particular element to get the value or to process it, first you would select that element by id – as no two elements can have the same id in a valid HTML. Let us assume you have the following ASP.Net TextBox server control in your WebForm. We are taking asp:TextBox…
Got any book recommendations?