Posts

highlight selected row In html table jquery

Highlight row on row click   $(document).ready( function () { }).on( 'click' , '#Data_TBL tr' , function () {   var all_tr = $( 'tr' ); all_tr.removeClass( 'selected' ); $( this ).closest( 'tr' ).addClass( 'selected' );   //alert(id); });

Filter Array example in jquery

Simple example of filtering  array with value let Cities = cities1.filter(function (e) {     return e.population == 3000000; }); console.log( Cities ); Ask for more examples.

Create Login With Role Using Thee Tire Architecture In Asp.Net C#

Image
1) Create table CREATE TABLE  `dbname`.`login` (   `id` int(11) NOT NULL auto_increment,   `userid` varchar(50) default NULL,   `password` varchar(50) default NULL,   `Role` varchar(200) default NULL,   KEY `id` (`id`) ) 2) Insert Values into table ID USER-ID PASSWORD ROLE 1 Admin Admin@123456 Admin 2 Pratibha pratibha@123 Agent 3 Rohan rohan@123 Agent 4 User User@123 Customer

EBS Payment Gateway Integration In ASP.net C#

Full code of EBS payment Gateway Integration in .net Create Page name as pay.aspx and paste code

Redirect URL In asp.net c#

1) In location path add your old url 2) Then in httpRedirect add  your new url 3) In global.asax add new url to redirect on old page. There is page activities/scuba-diving.aspx  now i want new url that is activities/best-rated-scuba-diving-in-goa.aspx  there is no page by this name , i will redirect my old url to new url but page  will be same  activities/scuba-diving.aspx. <configuration>   <location path="activities/scuba-diving.aspx">     <system.webServer>       <httpRedirect enabled="true" destination="https://www.domain.com/activities/best-rated-scuba-diving-in-goa.aspx" httpResponseStatus="Permanent" />     </system.webServer>   </location> </configuration> Now add following code in global.asax.   static void RegisterRoutes(RouteCollection routes)     { routes.MapPageRoute("DynamicPagescuba", "activities/best-rated-scuba-divin...

Error : Object cannot be cast from DBNull to other types.

when there is null value in column we get following error Object cannot be cast from DBNull to other types. adding  following dbnull.value?false will resolve error in you f=gridview Checked =' <% # Eval("Approved")==DBNull.Value?false: Convert.ToBoolean(Eval("Approved"))  %> '

Convert aspx Page To PDF In asp.net

Response.ContentType = "application/pdf" ;         Response.AddHeader( "content-disposition" , "attachment;filename=TestReport.pdf" );         Response.Cache.SetCacheability( HttpCacheability .NoCache);         StringWriter sw = new StringWriter ();         HtmlTextWriter hw = new HtmlTextWriter (sw);         this .Page.RenderControl(hw);         StringReader sr = new StringReader (sw.ToString());         Document pdfDoc = new Document ( PageSize .A4, 2f, 2f, 10f, 0f);         HTMLWorker htmlparser = new HTMLWorker (pdfDoc);         PdfWriter .GetInstance(pdfDoc, Response.OutputStream);         pdfDoc.Open(); ...