0

Can I Inherit multiple code files in ASP.NET ?? either all are C# or one is C# and other are VB ??

Is there any possibility to make use of 2 programming languages like C# and VB.NET or other in a single ASP.NET page?

I heard we can work on both PHP and ASP.NET together on same page how come its true??...

Karthik Malla
  • 5,570
  • 12
  • 46
  • 89

3 Answers3

1

you can use C# and vb files in one project, but you cannot use 2 languages in one page (in code behind).
To integrate PHP with ASP.NET - read this question: Best way to integrate PHP with asp.net / asp.net-mvc

Community
  • 1
  • 1
Marek Kwiendacz
  • 9,524
  • 14
  • 48
  • 72
1

Within a single ASP.NET (aspx) file it is possible to use two seperate languages using the following syntax

<script language=c# runat=server> 
...
</script>

<script language=vb runat=server> 
...
</script>

The real question is why would you want to do something like this, it would make your code impossible to maintain

Barry
  • 446
  • 2
  • 7
0

You can only inherit multiple code files if they are part of the same inheritance hierarchy - remember a page is just a class, so all the normal inheritance rules apply.

flesh
  • 23,725
  • 24
  • 80
  • 97