Posts

Showing posts from December, 2017

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-diving-in-goa.aspx", "~/

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"))  %> '