.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

How to create CAB file and use ActiveX/ocx on ASP web page in VS2008

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
Hello, I have spent last couple of days on this subject but no luck :) I want to achive following using VS2008/C# - 1. create a cab file using existing AciveX/ocx control, 2. use the ActiveX on ASP.NET WebForm.   3. deploy the app and cab file on web server 4. Test/verify that the cab file get downloaded, and IE can use my ActiveX/ocx I found one nice tutorial on this but it is with VB.Net (not VS2008) - http://msdn.microsoft.com/en-us/library/aa291417(VS.71).aspx (the problem I get with VS2008 - can's see Authenticode Signing check box, or add ActiveX to Toolbox). I am newbie on this ActiveX stuff. Can anyone help/send me the link for tutorial or provide steps to acieve this. Thanks NC  

View Complete Post

More Related Resource Links

"File Not Found" Error when Trying to Create a New Page

I have installed SharePoint 2010 Foundation with a Server Fram Configuration (in order to integrate it with the installed SSRS). On top of the foundation, I have created a site collection on port 80 (with business intelligence template). The site collection is running fine, as I could add web parts and edit the default page, however, when I try to create a new page from "Site Actions -> New Page" and then I put a page name like "NewPage" and click on "Create" button, I get the following error message: +++++ START OF ERROR MESSAGE +++++ Error File Not Found. Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: efcb0dde-66ea-46df-b3a1-59a9918f6cb4 Date and Time: 9/12/2010 11:50:41 AM +++++ END OF ERROR MESSAGE +++++ Other error messages when I create site within this site collection and try to edit their pages. The steps I followed to do so are: "Site Actions -> New Site" Select "Business Intelligence Center" and put a title and URL name, and then click on create. The error message I get when I try to edit the defaul page on these newly created sites: +++++ START OF ERROR MESSAGE +++++ List does not exist. The page you selected contains a list t

VS2008 fails to create TLB file during compilation

I have a COM visible library originally created in VS2005. When I compile this project in VS2008 it creates a tlb file automatically. Now I've created a new COM visible library in VS2008 and I've set the ComVisible attributes and guids in the same way as the other project but when I compile it I get 2 warnings '... does not contain any types that can be unregistered for COM interop' and '... does not contain any types that can be registered for COM interop'. I don't know why this is happening has anyone got any ideas?

How to create and use both local and global resource file in a page in VB.NET?


Hi all,


    I need to create both local and global resource file in VB.NET. And also i need to use both resource file in a single page. Please help me how to create and use in VB.NET (VS2008).


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.

Page Title from Resource file...



I have Resource file...

I am using following code for Display Lable Text...

<asp:Label ID="lblName" runat="server" Text="<%$ Resources:resource,NAME %>"></asp:Label>

and I want to use that name for page title...

so I used "me.page.resources.resource.NAME" in code behind page.

 but I want to use that NAME in

<%@ Page Language="VB"

Want to create Page URL rewrite based on Users GUID and Display name?



I am using the asp.net membership. 

On my site I have a Profile.aspx page.

In the code behind of this page,  i get the logged in UserId (Guid) and pass

this to a method in my DAL. GetUserByUserId()


In my database I have a Table called Member which the method gets the data from

and displays details on the page about  the user.


What I want to happen is when they have logged in and are diverted to Profile.aspx,

the page URL shows www.MyWebSite/Profile/UsersName 

for example



is this possible. In my Member table I have FirstName and LastName columns or do I get the

name from the membership table.


even better would be they go straight to www.MyWebsite/JohnSmith.aspx


thank you for any help






I want to create registration page and login page


I have design form layouts for signup and login pages 

Please provide me the step by step code for sign up and login pages using c# with validation.

waiting for urgent reply

file upload in Create User Wizard Created User event with UpdatePanel Tag wont work?



In my Create User Wizard1 Created User Wizard Event, I am collecting extra information from text boxes and allowing

the user to uplad a file.



I have put the Submit button within an Update Panel Tag but since I have done this it does not work.

Is there a way round it. In this situation would you use a trigger.?


<br />

  <asp:UpdatePanel ID="UpdatePanel2" runat="server">

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  align="middle"
                                            Text="Submit my Profile" />

VS2010 Express ASP.net and database file with SQL Authentication - How to create database file with


Hi, I have installed Visual Studio 2010 Express in my local system.

Steps 1. File->New Website

 2.Open datbase explorer, right click on dataconnection

 3.Select Create new connection

 4.use Microsoft SQL Server Database file

5. Type new databse filename

6. Now i want to use SQL authentication which is not working

 7.If we use windows authentication its wokring without any problem

8.But i need sql authentication to be used.

 9.I have not installed SQL studio.

 I am only using the one which is packaged in VisualStudio 2010 SQLClient. Let me know how can we create a new database file with userID and password. So that i can host it in other systems as well without any windows authentication.  I know that VS2010 setup also installs the SQL client which is requiredto create and manage sql databse files/quries etc


i dont know the default userID and password for SQLauthentication. As the express setup did not asked any credentials while installing SQL components


Thanks and regards

 Mahesh kotekar


Extra file is included on the Page directive inherits =



I am trying to understand where the additional file name is coming from in my Page directives Inherits

attribute like so :

inherits ="Track_Milestones2, App_Web_techsrvcs_track_milestones2.aspx.cdcab7d2"

Is the result of this app being published on my local server at one time or could this

page have been compiled on a server ?

Thanks for your insights !

How to create a single entry page for site collections in MOSS 2007



I have  7 site collections containing a few hundred team collaboration sites. Some users are internal (intranet) but most are external (extranet). Extranet users are experiencing problems with losing links to their sites and forgetting which URLs to use. So I would like to create a single entry page that all users can enter after the logon process, which shows a list of sites they have permission to access, and other user-specific information. Perhaps relevant documents, tasks, recently modified documents etc.

I know this sounds like a 'My Site' but we want to use use a general welcome page instead. We use Windows authentication.
What is the best way of doing this and is it something that can be done in SharePoing Designer or does it need to be done in Visual Studio?

Many thanks in advance.

how to create a wiki as page link

hi i want to create a page which should display all wikis and im looking to create a button which should redirect to the page tab with all wiki's

Create excel file from Binary data on SqlServer



My requirement is that i upload an excel file then i need to validate that data.


1. Uploading file using using upload control saving binary in SqlServer

2. Then i am creating file from binary data  on Sql Server using below command and then using OPENROWSET to dump data to Sql table

3. Then reading Sql Table row wise and validating data.


Alter Procedure spUploadExcelFile
  @PKID int,
  @BatchID int


	Declare @VarBin varbinary(max)
	Declare @FileName varchar(100)
	DECLARE @sql nvarchar(MAX)
                DECLARE @errMsg nvarchar(MAX)
	DECLARE @ObjectReturn INT
	DECLARE @ErrorSource VARCHAR(255)
	DECLARE @ErrorDesc VARCHAR(255)
	DECLARE @ObjectToken INT

	Select @VarBin  = Content , @FileName = [FileName] from MultilangBinaryData Where PKID = @PKID
	SET @FileName = 'C:\'  + @FileName
	EXEC sp_OACreate 'ADODB.Stream' @ObjectToken OUTPUT
	EXEC sp_OASetProperty @ObjectToken, 'Type', 1
	EXEC sp_OAMethod @ObjectToken, 'Open'
	EXEC sp_OAMethod @ObjectToken, 'Write', NULL, @VarBin
	EXEC sp_OAMethod @ObjectToken, 'SaveToFile', NULL, @FileName, 2
	EXEC sp_OAMethod @ObjectToken, 'Close'
	EXEC sp_OADestroy @ObjectToken  
	SET @sql = 'INSERT INTO dbo.UserBulkData SELECT 0,NULL,'+ @BatchI

How to get current page file name?


I am trying to get the current page file name that i access to.
Lets say i am at test.aspx page, i want it to return me "test" file name.
I tried to use this.Page.toString(), it returned me "ASP.test_aspx" which is like half correct....
but i would like to get only "test".

2nd question, this.Page.toString() will always return me in a format of ASP.[filename]_[fileextention]?
If that's the case, maybe i can use splilt function to get the file name i want if there aren't any better solution than that.



Create PDF file in server side

Hi,I need to create a .pdf file which can download by client clicking on the link in my web site. That pdf should be generated using stored information in database. It has different types of fonts which has not installed in client machine and only installed in web server. In this case, I'm not interesting to use crystal report or any other third party components that need to register to use and has some limitations.How can I do that using ASP.NET with C#?Thanks.

VS2008 and C#: How to create PictureBox controls programmatically in a FlowLayoutPanel ?

I am trying to create multiple PictureBox controls in a FlowLayoutPanel programmatically. The number of the PictureBox controls is dynamic depending on the target image folder. My current approach results a compilation error:             // (Works !)             pictureBox1 = new System.Windows.Forms.PictureBox();             pictureBox1.Width = 150;             pictureBox1.Height = 150;             flowLayoutPanel.Controls.Add(pictureBox1);             string sFileFullName = "Resources\\file1.bmp";             pictureBox1.Image = Image.FromFile(@sFileFullName);             // (Error !)             string pbName = "pictureBox";             for (int i = 0; i < 100; i++)             {             

VS2008 and C#: How to create a short cut for a selected item in a ListView/TreeView ?

How to create a short cut for a selected item from a ListView/TreeView ? Is it possible to provide a smaple code ? Thanks,
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