Posts

Highlight gridview row in update panel without posting back in asp net

When user selects particular row of gridview then that row should be highlighted. but in asp.net you do not have mechanism to to this task automatically. For this purpose you need to write some custom code, which includes some JavaScript code. to highlight the row selected by user follow the step below For this you have to write this code in your code behind file in OnRowCreated event or your can also write this code in OnRowDataBound event of grid... protected void ctlGridView_OnRowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onclick", "onGridViewRowSelected('" + e.Row.RowIndex.ToString() + "')"); } } then add following script to your aspx page in script tag <script language="javascript" type="text/javascript"> var gridViewCtlId = '<%=ctlGridView.ClientID%>

Root your Gingerbread 2.3.4 android Mobile Phone

Root your Gingerbread 2.3.4 android Mobile Phone with following steps. before you start you have to download some files from here and follow the steps below  Put the phone in Debug Mode: Go to Settings > Applications > Development and check USB debugging box. Extract the files from the zip below, connect the phone via USB, and copy them to the phone via ADB like this: Code: adb push Superuser.apk /sdcard/Superuser.apk adb push su /sdcard/su adb push busybox /sdcard/busybox adb push exploit.bin /data/local/tmp/exploit.bin   Now we enter the phone's internal shell, also using ADB: Code: adb shell Then we take advantage of the "fake" root exploit: Code: cd /data/local/tmp chmod 0755 exploit.bin ./exploit.bin Now after that last command you should be back to your normal console, not the phone one, so we need to connect to it again, and doing so we should now see that we have root permissions since the "#" symbol is displayed

Proxy settings in android phone

Hi all, here i am going to demostrate about the proxy settings in android phone. As there is no UI for proxy settings for android web browser. But the android web browser will read the proxy settings in its settings database. Here is the instructions to enable the proxy in the android web browser. to do this setting you must download SDK package from android you need to check USB Debugging option in phones setting and follow the step given below > adb shell # sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db sqlite> INSERT INTO system VALUES(99,’http_proxy’, ‘proxy:port’); sqlite>.exit You can talk to settings.db for more information. sqlite> SELECT * FROM system; sqlite> .tables sqlite> .databases sqlite> .schema table_name sqlite> more SQL expression to talk to the tables Don’t forget the ‘;’ at the end of the SQL expression.

How to get/find height and width of window using javascript

By knowing heigth and width of window we can place divs, messages,status wherever we want by using top left property of element. for that you should provide value of top and left to view in different monitors to get dynamic top left position you must find out the window width & height. following code will demostrate you to find out the window width & height which supports in  almost all browsers .   function windimension(){ if(window.innerHeight !==undefined) { var width= window.innerWidth; var height=window.innerHeight]; // most browsers } else{ // IE varieties var D= (document.body.clientWidth)? document.body: document.documentElement; var width= D.clientWidth; var height=D.clientHeight; } } Hope this will help u.......

Adding events to DOM Elements in javascript by For IE, Mozilla, Opera browsers

To add events to DOM element Dynamically using javascript needs to write different code for different browsers. Browsers Like Mozilla, Opera support the "W3C DOM Level 2 event binding mechanism"  which uses a function on DOM elements called addEventListener.  Following the way to  add events to DOM element Dynamically for all browser. if (window.addEventListener != null) { // Method for browsers that support addEventListener, e.g. Firefox, Opera, Safari window.addEventListener("focus", FocusFunction, true); window.addEventListener("blur", FocusLostFunction, true); } else { // e.g. Internet Explorer (also would work on Opera) window.attachEvent("onfocus", FocusFunction); document.attachEvent("onfocusout", FocusLostFunction); //focusout only works on document in IE }  Hope this will help you guys........

HTTP Error 500.21 - Internal Server Error - Simple Solution

HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list. If you getting above error after publishing your asp.net application in IIS 7 then following is the simplest solution for you. Go to command prompt. Navigate to C:\Windows\Microsoft.NET\Framework\v4.0.30319 path. Then type aspnet_regiis.exe -i and hit enter. If you got message like "Asp.net installed suuccessfully" then you have done it then. Remember you must have administrator rights to do the above procedure .

Creation of Date Format function using javascript and Jquery

If you want to format the datetime string of database in your html file you need to get help from JavaScript.In javascript there is no pre define function exists to format date time string in dd MMM yyy. To accomplish the above task you need to write custom code. The following  is the custom function by using that you can format your date-time string in dd MMM yyyy format first you need to write array which has all months var gsMonthNames = new Array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ); Then add following function in html file function dFormat(date) { var result = ''; if (date != '') { var dateArray = date.split('/'); if (dateArray.length > 1) { result = dateArray[1] + " " + gsMonthNames[parseInt(dateArray[0])-1] + "

Solution for HTTP Error 500.19 - Internal Server Error

Error Message: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information Module IIS Web Core Notification BeginRequest Handler Not yet determined Error Code 0x80070021 Config Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false". Config File \\?\C:\inetpub\wwwroot\web.config Requested URL http://localhost:8081/ Physical Path C:\inetpub\wwwroot\ Logon Method Not yet determined Logon User Not yet determined Config Source 144: </modules> 145: <handlers> 146: <remove name="WebServiceHandlerFactory-Integrated"/> Reason: ERROR CODE: 0x80070021 is ERROR_LOCK_VIOLATI

Enable disable all buttons of html form using Jquery

To enable disable all the buttons of html form needs to write lots of code in JavaScript. In JavaScript first we need to find all input elements which having input type submit and store it in array. After storing elements in array needs to loop that array and disable or enable element one by one. Instead of writing lots of code we can use JQuery one line code as follows $('input[type=submit']).attr('disabled',true); The above JQuery code will disable all input elements which having type submit. Happy coding...............

Get value of dropdownlist or html select using Jquery

In Jquery, you need to write one line code to get value of dropdownlist. You can use following code to get value of selected option Var selectvalue=$('#urid').val(); You can use following code to get text of selected option Var selecttext=$('#urid').text(); you are done......   Happy coding...........