c# as default language

Last post 07-01-2009 7:49 PM by Mikhail Arkhipov (MSFT). 3 replies.

Sort Posts:

  • c# as default language

    06-29-2009, 5:18 PM
    • Member
      point Member
    • looksgood
    • Member since 06-29-2009, 9:09 PM
    • Posts 2
    hi all,
    if i open a random aspx page (like someone emailed me) in visual web dev 2008 express that doesn't have a <%@ page language %> defined, the editor defaults to vb.net for the script blocks in the page. can the default be changed to c#? import/export doesn't have a visual c# dev settings for visual web dev 2008 express.

    thanks
  • Re: c# as default language

    06-30-2009, 12:53 AM
    • Member
      78 point Member
    • DeadlyKill3r
    • Member since 06-06-2009, 4:27 AM
    • Posts 22

    u can set page language as u want.. 

    if the code is written in the vb.net den i makes some error if u change the language.. 

    The best and convinent method for beginers to change the page language is that u can add new item into ur project den u can add some class nd at the bottom of the page u can check the default language from the drop down list...


    another way for change the default language in web based application is that u can enter the following code in the top of ur aspx file


    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Your Code File.aspx.cs"  %> 


    if u can ask some more thing den ask me freely 


    if this post help u out kindly mark this as Answer


    Regardz

    Deadlykill3r

  • Re: c# as default language

    07-01-2009, 10:08 AM
    • Member
      point Member
    • looksgood
    • Member since 06-29-2009, 9:09 PM
    • Posts 2

    thanks, but not what i'm looking for. again, i have a random, isolated web form (aspx) page with no <% page language %> specified. also no language specifield for the server script block in the page (no code file). apparently visual web dev defaults to vb when nothing is specified. i want it to default to c# for everything web. web forms, user controls, asax files, whatever.

  • Re: c# as default language

    07-01-2009, 7:49 PM
    Answer

    If page has no language specific, VB is assumed. ASP.NET has a way to specify default language in web.config, but VWD does not support this specification. In other words, you have to specify language in the page directive.

    Thanks

    ------------------------------------------------------------

    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (4 items)