Loading ...

TrustedBlogs

Who is online?  0 guests and 0 members
home  »  blogs  »  Raghav Khunger: January 2011

Communifire Blogs

Raghav Khunger :January 2011 postings

Raghav Khunger

Get filename without extension in C#

1/31/2011 by Raghav Khunger · 0 · 2954

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...

Raghav Khunger

Get date difference in days in JavaScript

1/28/2011 by Raghav Khunger · 0 · 2028

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"&...

Raghav Khunger

Show iframe in full screen

1/28/2011 by Raghav Khunger · 0 · 4747

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...

Raghav Khunger

Disable LinkButton with jQuery

1/27/2011 by Raghav Khunger · 0 · 4070

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...

Raghav Khunger

Disable all input controls on a form with jQuery

1/27/2011 by Raghav Khunger · 0 · 2455

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...

Raghav Khunger

How to open jQuery UI Dialog from codebehind

1/27/2011 by Raghav Khunger · 0 · 6689

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 "-/...

Raghav Khunger

Expand/Collapse all nodes of ASP.NET TreeView control with jQuery

1/20/2011 by Raghav Khunger · 0 · 8556

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...

Raghav Khunger

Unsafe code may only appear if compiling with /unsafe

1/20/2011 by Raghav Khunger · 0 · 1504

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...

Raghav Khunger

FB.getLoginStatus() called before calling FB.init()

5/12/2011 by Raghav Khunger · 0 · 3875

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...

Page 1 of 1 (9 items)

Product Spotlight

ASP.NET Hosting Spotlight

Join CodeAsp.Net for FREE Today!

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:

 

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?