.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

what is .htc file and how do I add this file to my asp.net 2.0 web applications

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :ASP.Net
what is .htc file and how do I add this file to my asp.net 2.0 web applications   give me idea or tell me how to do that\ thank you maxmax

View Complete Post

More Related Resource Links

How to get SharePoint file conent by URL from web applications with claims based authentication conf



I am using next code to get SharePoint document content:

using (System.Net.WebClient objWebClient = new System.Net.WebClient())
                    objWebClient.Credentials = new System.Net.NetworkCredential("username", "password", "domain");
                    using (System.IO.BinaryReader file = new System.IO.BinaryReader(objWebClient.OpenRead("http://machine_name:10000/Shared%20Documents/some_file.txt")))
                        //Read file stream

How can I get a list of applications registered for a certain file extension in a WPF application?

I'm looking for a Win32 or Shell function that can be called from a WPF application to get a list of registered applications in Windows for a specific file extension. For instance if I would pass ".rtf" to the function it should return something like "Microsoft Office Word|C:\Program Files\Office\Winword.exe|Wordpad, C:\Program Files\Windows NT\Accessories\wordpad.exe". I need this to construct a 'Open with' context menu somewhat related to the file context menu in Windows Explorer. In Windows Forms I could get the the Windows Explorer context menu with IContextMenu, IShellFolder etc. But this approach requires a WndProc because the context menu data will be send with WM_ messages. But for WPF this is not an acceptable solution because there is no WndProc. I know that I can get that data from the registry HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\OpenWithList but I will not use it because in a future Windows release the registry structure may change and this would break my application. I also don't want to mess around in Windows internal data. And there is no list to get anyway. All I found in the registries .png\OpenWithList key was a DllHost.exe and mspaint.exe. But DllHost.exe is no application to open a .png file. And the mspaint.exe doesn't specify a path. The display names are also missing.

Problem in the Console Applications app.config file for .NET 4.0



I am developing a console application.  I am going to use that in 3 environments. I have placed a key in the appsetting section and i am expecting the value to be overwritten by the respective config file specified during the build time.

    <appSettings file="Stage.config">
        <add key="DataConfiguration.ActiveLocation" value="Production"/>
        <add key =name="Dev.Local" providerName="System.Data.SqlClient" connectionString="data source=Test\SQLSERVER2005;initial catalog=ABCD;user id=admin;password=asdh511"/>

And the Stage.config values are

<add key="DataConfiguration.ActiveLocation" value="Staging"/>


How to get SharePoint file content from web applications with claims based authentication configured



I have custom web service developed (it is running out of sharepoint context but on the machine where sharepoint server 2010 is installed). This web service should get SharePoint file content using file URL and some specific user credentials. So in case user doesn't have access to the file some exception should be thrown. Otherwise content should be returned.

I am able to use next code:

using (System.Net.WebClient objWebClient = new System.Net.WebClient())
                    objWebClient.Credentials = new System.Net.NetworkCredential("username", "password", "domain");
                    using (System.IO.BinaryReader file = new System.IO.BinaryReader(objWebClient.OpenRead("http://machine_name:10000/Shared%20Documents/some_file.txt")))

File Splitter in .Net

I love to do utility programs in .Net. And this is one of them. As I was playing with JSplit (a free file splitter program), I wondered if I could do it in .Net. The framework supports file operations like reading files in bytes and creating them. It is indeed easy to do file operations in .Net Basics on File operations

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Creating Excel file from C#

I used below coding for create a excel sheet.I got from on web site.
In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate the Error message.The exception is

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

SmtpClient and Locked File Attachments

Got a note a couple of days ago from a client using one of my generic routines that wraps SmtpClient. Apparently whenever a file has been attached to a message and emailed with SmtpClient the file remains locked after the message has been sent. Oddly this particular issue hasn't cropped up before for me although these routines are in use in a number of applications I've built.

How to call an .exe file in .net

Sometimes a developer has to call an EXE from another EXE. While calling EXE there can be a requirement to pass parameter.

ClientAccessPolicy file in SharePoint 2010

I am upgrading my Silverlight demo code from the old beta to beta 2 and see that there are a few new considerations for the deployment of ClientAccessPolicy.xml files. In a previous post I demonstrated how to do this for SharePoint 2007. The heartburn that I get with that approach is any site collection owner or designer can drag the file into the site collection and open the site up to unwanted client access issues. In 2010 the virtual path provider no longer serves the files from the root of the site collection

Multi File Upload Using JQuery!

Everyone knows about the file upload in .NET. But the multi file upload is some what difficult in .NET. For that purpose we can have some AJAX or JQuery!. Jquery is the latest advanced version. It will give some animated upload. You can try it for your own!!!!

Transfering a file from Conputer to PDA

You can transfer one file at a time between your computer and another Bluetooth device by using the Bluetooth File Transfer Wizard. For example, you can transfer files between your computer and a mobile phone or a PDA. You can also transfer files between two computers that use Bluetooth.

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or pasting into an application. 2D versions are also available:

Import XML File to SQL Table

Here is a brief example of importing an XML file into SQL Server table. This is accomplished by using the BULK option of OPENROWSET to load the file, and then utilizing the XQuery capabilities of SQL Server to parse the XML to normalized table format. This example requires SQL server 2005 or SQL Server 2008.

First, the following XML is saved to XML file C:\Products.xml.

Xml File Methods and Properties

Method and Properties of XmlTextWriter class:
The XmlWriter class is a base class that outputs an XML data structure. It has methods to sequentially write XML elements in a proper hierarchy to create an XML file or other types of output streams. The System.Xml namespace provides support for the XmlWriter. It must be imported to the ASP.NET page with the directive

<%@ Import Namespace="System.Xml" %>

The XmlTextWriter

XmlWriter is an abstract class that is implemented as an extended XMLTextWriter class. The XmlTextWriter writes a sequence of XML nodes one element at a time. Output can be written to an XML file, although other streams of output data can be produced. It can create a new file or overwrite an existing file. Its non-cached writing techniques provides very fast generation of an output stream.

Launch CMD File From ASPX Page


My organization uses a CMD file to install updated files for a major enterprise application. Currently, we send out an email to users with a link to the file and instructions to run it, BUT inevitably users don't update their machines until their in field and try to start the app.


We're now liking the idea of using an ASPX page to prompt the users to run the updates and to capture the fact that the updates have been run. I realize that we can't capture the success or failure of the update. But we'd like to capture the user accessed the page.


Is it possible to embed into the markup for the page a link to the file on the local intranet that the users can click on to run the file?

The user accessing the page would capture that they did just that. We'd deal with wether or not the update was actually installed or if it failed later with them directly.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend