Adding a C# code behind page to a existing vb.net project page

I tried to add a .cs file to ab existing vb.net project and it seems to be rejecting the .cs code.  Is there a declaration i need to include in the .cs file so the compiler knows that the .cs file has c# code and not vb.net code?
0
bnisperos
1/7/2004 11:51:08 PM
asp.net.visual-basic.net 3721 articles. 0 followers. Follow

3 Replies
905 Views

Similar Articles

[PageSpeed] 3

Unfortunately, with this version of VS.NET you can't mix languages, so you'll have to put either one in a component and compile it separately.

Don
Don Kiely, MCP, MCSD
In the Last Frontier, Interior Alaska
Please post questions and replies to the forum! And remember to MARK AS ANSWER when someone definitively answers a question or resolves a problem!
0
donkiely
1/7/2004 11:52:03 PM
vs.net 2003?
0
bnisperos
1/7/2004 11:56:19 PM
Not in VS 2003 -- but there will be a way to do this in the next version.  You can work around this in VS 2002/2003 as Don suggests.
Tim McBride

This posting is provided "AS IS" with no warranties, and confers no rights.
0
timmcb
1/8/2004 12:57:07 AM
Reply:

Similar Artilces:

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At http://www.WebLogicArts.com/DemoList.aspx there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

convert c#.net page to vb.net
ok I have an entire page in vb.net and now I want to integrate some code from another page but it written in c#.net what is the easiest way to convert c#.net to vb.net I tried using www.kamalpatel.net/ConvertCSharp2VB.aspx but it only gave me errors here is what I am trying to convert let me know if you have any ideas http://www.nomorepasting.com/paste.php?pasteID=20953 With Alex Lowe's translator ' Messages Private NoFileMessage As String = "No file selected" Private UploadSuccessMessage As String = "Uploaded Sucess" Private NoImagesMessag...

Both C# ASPX pages and VB.NET ASPX in single VB.NET Web Applcation Template
Hi.. Is it possible to have both c# pages and VB pages in same Webapplication, what i chose is VB.NET Web application Template. With Thanks, Jaya.... I don't see why you couldn't, but for the sake of consistency I don't know why you would want to do this. When you choose a C# or VB.NET application template(I'm assuming you're using VS or WebMatrix), it simply creates a .aspx file that includes a page directive that specifies the page language. If you created a C# template but want to use VB.Net instead, you need to go from: <%@ Page Language="C#" .... to...

What are the diff. visual basic 6 and vb.net ? How to convert the VB6 project to vb.net proj ?
What are the diff. visual basic 6 and vb.net ? How to convert the VB6 project to vb.net proj ? with code and interface too. There are entire forums dedicated to the differences between the two, and to convert your projects you should try the upgrade wizard in Visual Studio....

How to convert C#.Net code to VB.Net code ???...
HI, i was searching something new, then i suddenly find some tips to convert C#.Net code to VB.Net but i did not do well. i am puttint its url here plz tell me how to convert C#.Net code to VB.Net. http://www.dotnetspider.com/code/C-273-Convert-C-VB-NET.aspx Jasim...Please remember to click “Mark as Answer” on the post that helps youJasim AkhtarNew Delhi ( INDIA ) It would be better if you write the problem you having, while converting from C# to VB.NET. You cannot completely rely on online converters. ThanksMark post(s) as "Answer" that helped youElectronic ScrewWebsite||Bl...

Translate c#.net code to vb.net code
Hi I can usually do the translation myself, but this time I am a bit stumped  Let us consider to rewrite Urls (more than 16000 links) using a table. Save original url and rewritten url in a table. Now add a class file in App_Code folder. class UrlRewriteModule : IHttpModule{    public void Dispose()    {        // Nothing to dispose    }    public void Init(HttpApplication context)    {        context.BeginRequest += new EventHandler(context...

Paging in AP.NET/VB.NET
Hi All, Well... a simple problem perhaps regarding paging in an asp.net application using vb.net. I have a datagrid named dgResult and being trying to implement paging on it.  Following is the code to capture the PageIndexChanged event. Sub dgResult_PageIndexChanged(ByVal sender As Object, ByVal e As DataGridPageChangedEventArgs) Handles dgResult.PageIndexChanged dgResult.CurrentPageIndex = e.NewPageIndex GetProperData() End Sub I have a break point at dgResult.Curre.... position.  The datagrid, just do not accept the method and I can not event trap the event using a break ...

converting to vb.net from c#.net authorize.net
authorize.net offered me some sample code when I signed up with them the only problem is the sample code is in c#.net but my page that they type all of their credit card into is vb.net <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage("https://certification.authorize.net/gateway/transact.dll"); } private String readHtmlPage(string url) { ...

Migrate code from vb.net to C#.net
Hello friends, I had created a web site using visual studio 2005. web site was created using the language vb i.e. VB.net. Now as per the clint requirement I have to migrate all the code in C#. So the question is that is there any tool or any inbuild utility in Visual Stuidio so that we can migrate the site from vb.net to C#.net. Or we have to do it mannually i.e. by changing each and every line of code mannually? Kindly suggest me. Thanks & Regards Girish NehteThanks & RegardsGirish NehteIf This post helps you to solve your problem please mark this as an answer. Hi, at the mome...

How to change vb.net code to C#.Net ?...
Hi, Earlier i had a class  that i got it from this Forum, it in vb.net and i am trying it to convert it in c#.net but i am unable to covert properly to work. the functionality of this class is to convert number value to words. i am putting both of code c#.net and VB.net please rectify it.Public Class NumberToWords Dim Character As String Public Function ConvertNumber(ByVal A As Double) As String On Error Resume Next Dim MM Dim IM ConvertNumber = "" MM = Microsoft.VisualBasic.Len(A) IM = Microsoft.VisualBasic.Left(A, Mic...

How to migrate code from vb.net to c#.net?
Hi all,If anybody knows information on migration of VB.Net application to C#.net. i.e Any tools available, best practices, methodology for estimation. etc.   RegardsHelen    Hey, Take a look at this topic http://forums.asp.net/t/1100603.aspxMaybe some of these sites can be of help to you.  Arnold you can do it by page by page just copy and paste ur page in the following link http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx and convert ur vb.net to c# gotcha!!YasserSpica.www.spica.aewww.bncnetwork.netPlease remember to mark as answers i...

vb.net vs c#.net vs j#.net
just out of curiousity which looks, acts most like java? i'm still learning trying to used to vb.net but it seems that it was easier to do some stuff with java. C# is Java++ in my opinion. If you have done C or Jave you will prefer C#.Mike Schellenberger - MCAD If you are looking for language similar to java go for J#. However most code samples you find on the net will be in VB.NET and C#....

How to access a menu that a exists in a master page from other page (VB.net)
Hello, I have a menu in the master page and I want to refer to this menu from another page (to be precise I want to refer to a menuItem of this menu -childItem). I tried something with code (Vb.net) : Dim mymenu As Menu = FindControl("menua")         ----- Where menua is the id of my menu in the master page but then when I tried to use the variable mymenu I cannot access the menuItem I want. Generally, I would like to know if someone has a sample of code with which I can refer to the menu that exists in the master page (and also access th...

Web resources about - Adding a C# code behind page to a existing vb.net project page - asp.net.visual-basic.net

Pre-existing condition - Wikipedia, the free encyclopedia
J. James Rohack, president of the American Medical Association , has stated on a Fox News Sunday interview that exclusions, based upon these ...

How To Launch Existing Apps, Services From Facebook Developer SocialAppsHQ Under Your Brand
Facebook application developer SocialAppsHQ launched a white-label version of its platform, which allows agencies and other clients to create ...

A New Way To Re-Engage Your Existing Mobile App Users
Today we are introducing a new way to re-engage your mobile app users with Facebook ads. You can now advertise to people who have taken specific ...

Facebook expands IPO with additional 83.8M shares from existing stockholders
... according to an eighth amendment to its S-1 filing with the Securities and Exchange Commission. Most of these shares are being sold by existing ...

How do you grow your brand through existing clients?
Anna Farmery and I are doing a podcast this week on how to leverage happy clients to grow your brand. We&#39;d love to include your advice in ...

Anytune for Existing Anytune Pro Customers - Choose the Perfect Pitch. for iPhone, iPod touch, and iPad ...
Get Anytune for Existing Anytune Pro Customers - Choose the Perfect Pitch. on the App Store. See screenshots and ratings, and read customer reviews. ...

“The important thing is not to stop questioning. Curiosity has its own reason for existing.” Albert Einstein ...
Pretty dreary here today, but this stop sign caught my attention. Bright, vivid colors can draw attention and add "pop" to a photo. Make a photo ...

SIMple plan: More consumers taking existing mobile phones to new plans to 'enjoy freedom'
More Australians are holding on to their existing mobile phones when signing up to post-paid plans, saying they enjoy the &quot;freedom and flexibility&quot; ...

US existing home sales fall in August
... as investors retreated from real estate and first-time buyers remained scarce. The National Association of Realtors says sales of existing ...

Time to make existing fire-zone homes safer?
It's a timely question to pose.

Resources last updated: 1/16/2016 6:52:21 PM