Today I was in a need where I had to get the filename without extension from a path. I decided to write a blog on what I did to extract that. I used Path.GetFileNameWithoutExtension Method (System.IO). This method returns the name of the file of specified path without the extension. Below is the complete sample code on how to use it: using System; using System.IO; namespace MyConsole { c...
Hi , this article will demonstrate how to authenticate your site's users using windows live Id. Authenticating your users using Windows Live Id is an easy option to avoid the extra labor involved in maintaining user records and asking your users to sign up specifically for your site.This not only simplifies your work,but also helps to rely upon a trusted authentication service provider. ...
When working with themes, in most of the cases we set the default theme in Web.config <pages theme="Default"> ... </pages> However, this means that all pages in our site will use this theme. Today, I was working on solving an issue with some jQuery UI tabs content navigation which loads other ASPX pages. In the other ASPX pages I have some operations which decide what content...
In this blog I am going to show how to get date difference in days in JavaScript. I have seen this question asked many times on the forums so below is the quick sample code for the same. Below I have extracted the number of milliseconds between two dates and divided that with the number of milliseconds of per day. <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"&...
In this I am going to show how to show iframe in full screen or full page. A persone asked me on the forums on how to show the iframe covering the whole screen i.e 100 % height. I decided to write a quick blog on the solution which I gave to him. Below is the code for it: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...
Today a person asked on the forums on how to disable ASP.NET LinkButton using jQuery. Thinking this, it seems that it would be just as simple as like disabling other controls. But it is not the same, we need to do a little bit more. Below is the sample code for it: <head id="Head1" runat="server"> <title></title> <script src="http://ajax.googleapis.com/ajax/libs/jque...
I saw a person asking on forums on how to disable all the input fields on a form with jQuery. I decided to write a blog on this. User will click a button and all the input feilds of the form will get disabled. Below is the code for it: <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd...
In this blog I will show how to open jQuery UI Dialog from codebehind. I saw this question asked on the forums. I decided to write a quick blog on it. Basically what we are going to do is render the neccessary JS code for UI dialog from codebehind and when the page will render, it will show the dialog. Below is the code for it: <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-/...
Hi all... Today I was testing the ThemeRoller in the jQuery UI and have noticed that while I was testing the TR, they have updated the jQuery UI version to 1.8.9. With this version, there are some bug fixes in few jQuery UI controls. You also have the new version of jQuery UI scripts available in the Microsoft CDN (Content Delivery Network) Uncompressed: http://ajax.aspnetcdn.com/ajax/jq...
Today a person asked on the forums on how to expand or collapse all the nodes of ASP.NET TreeView control with jQuery. I decided to write a quick blog on this. In this blog I will take an ASP.NET TreeView Control and a link to exand/collapse all the nodes of the tree. User will click on the link and accordingly nodes will be expanded/collapsed. Below is the complete sample code for the s...
I recently found the Entity Framework FAQ website so I thought it would be great to share it with you. The website contains everything you need to learn about EF. Here is the list of categories you can find in their site: Introduction Architecture and Patterns ObjectContext Connections and Transactions Conceptual Model (EDM) Mapping and Modeling Querying Entity Classes Relationships Enti...
The Facebook API: Why it sucks? Thousands of developers are using the FB API not only for the different kind of applications developed for the Facebook platform, but also for simple things like Facebook Connect. We have been working on the API ourselves, and unfortunately reached the conclusion that its one of those badly written, poorly maintained APIs, with absolutely no thought given ...
If your codeblock contains unsafe keyword, means you are having unsafe code probably because dealing with pointers or unmanaged assemblies and you are getting the following compilation error "Unsafe code may only appear if compiling with /unsafe", this blog will help you. For the unsafe code the project needs to compiled with /unsafe mode. To turn on the unsafe mode on. Go to the project...
I would like to say HAPPY NEW YEAR 2011 TO ALL CODEASP.NET COMMUNITY MEMBERS AND VISITORS! I'm glad that I'm part of this great community and I hope we will work hard in the year ahead to achieve new goals and make the community grow as much as possible! I will look forward to continue posting blogs for the latest MS technologies especially regarding ASP.NET Web Development platform. If ...
I was using the FB API on my website and I noticed that FB login was not working on it. After looking the in the Firebug's Console tab I found that FB.getLoginStatus() called before calling FB.init() message was coming. Then I decided to look for that message in the http://connect.facebook.net/en_US/all.js JS file used by the FB API. Below is the screenshot for it: i.e when API KEY is no...
It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.
enter your email address:
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18