Posts

Showing posts from March, 2016

Stop resizing textarea html

Disable textarea resizable functionality textarea {      resize: none; } You can also resize textarea horizontal or vertical. textarea {      resize: vertical; } textarea {      resize: horizontal; }

Required field validator trigger single button in one page in asp.net

Solved: Mostly user face the issue when use required field validator. Two asp.net button problem trigger one button for validate and another button for another performing but disturbed both button to show error, this problem has been solved to "ValidationGroup" just defined button and which controls to validate. Example: <asp:RequiredFieldValidator ValidationGroup='grp1' ... /> <asp:Button ValidationGroup='grp1' Text='trigger for validation' ... />

Inline if else condition in c#

Its mostly use assign only one variable or object Example : you have a variable and you want to check null value int a = 100 ; string result = string .Empty ; if ( a < 20 ) { result = "a variable less than 20" ; } else { result = "a variable not less than 20" ; } you can use instead of old condition because its a major benefit to reduce line of code int a = 100 ; string result = a < 20 ? "a variable less than 20" : "a variable not less than 20" ;

How to make script with data in sql

Image
Solved  Now we describe to step by step for easy to understand that how to make script with schema and data in SQL Server. 1- First you right click on desired database which you want to make script then select Tasks --> Generate Scripts... 2- Show new window for generating script click to Next button. 3- Select all object to specific database after click on Next button. 4- Click to Advance button show script advanced options ( Types of data to script ) option to select Schema and data then click to OK button. click to Next button on previous window. 5- This window for showing summary for generating script. 6- Finally successfully generate the script and you can click to Finish button.

How to remove query string in asp.net

Solved Request.QueryString.Remove("Parameter-Name") just run the program only this code it showing the read only error. use the below code 100% working PropertyInfo isreadonly typeof(System.Collections.Specialized.NameValueCollection).GetProperty("IsReadOnly", BindingFlags.Instance | BindingFlags.NonPublic);             // make collection editable             isreadonly.SetValue(this.Request.QueryString, false, null);             // remove             this.Request.QueryString.Remove("Parameter-Name");