473,698 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

no code in webform using vs.net, but in webform using notepad

If I create a webform in notepad (save it with an .aspx extension), I can
see the VB.Net code along with the ASP.Net code in one file.

If I create an Asp.Net web application and add a web form using VS.Net, only
the Asp.Net code is behind the web form.

Where is the VB.Net code stored? And why is it stored differently than the
first way I mentioned?

Thanks.


Nov 18 '05 #1
1 1315
Hi Timmso,

VS.Net utilizes the concept of "code behind", where the code/logic to run a
webpage is stored in a class that inherits from the Page class. Your ASPX
page then inherits from this codebehind class.

The code for your file is stored in an aspx.vb file, in the same folder.
Try Project>Show All Files. The .vb files are then compiled into a DLL, and
do not need to be uploaded to the production machine.

IMO, "codebehind " is an ok idea in concept, but is doesn't work well in
practice in most scenarios -- a change to the .vb file requires rebuilding
the application. I've found it best to build middle-tier objects in vs.net,
and use dreamweaver or webmatrix to develop the application. Neither use
codebehind.

Alex Papadimoulis

"timmso" <ti************ **@Yahoo.com> wrote in message
news:eh******** ******@tk2msftn gp13.phx.gbl...
If I create a webform in notepad (save it with an .aspx extension), I can
see the VB.Net code along with the ASP.Net code in one file.

If I create an Asp.Net web application and add a web form using VS.Net, only the Asp.Net code is behind the web form.

Where is the VB.Net code stored? And why is it stored differently than the
first way I mentioned?

Thanks.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
19127
by: Ken Adams | last post by:
Basically I want to know how you could open a txt file in notepad through c# code. I don't want to read in the data or anything like that I just want to open the file just as it would have been if you double clicked it. Doesn't necessarily have to be notepad I might add. Any suggestions? Thanks a bunch. Ken
6
1865
by: Jiang Zhao | last post by:
Would you please tell me that some C# WebForm application (VS.NET 2002) can run/call windows executable file such as notepad.exe (use Process.Start)? if so how to do it. Jiang
4
7580
by: mg | last post by:
How can I run an .exe (located at the server) from within a WebForm? For example, run "word.exe mydoc.txt"
2
1537
by: John A Grandy | last post by:
for the code-behind a WebForm, it's easy to use ASP.NET session state -- just refer to the built-in Session object ... but how to write code elsewhere that utilizes this same object ? within a WebForm, Session is an instance of the class System.Web.SessionState.HTTPSessionState .... but how to refer to this same object outside of a WebForm's code-behind ?
3
1944
by: Tim Zych | last post by:
If I declare a procedure in a webform as Public and attach it to a button in the same webform, it runs fine. If I change it to Private Sub and try to click it i get the error: 'codelib.editcode.Private Sub SaveRecord(sender As Object, e As System.EventArgs)' is not accessible in this context because it is 'Private'. What am I doing wrong? Everything is in one webform.
6
3369
by: cpnet | last post by:
I've authored a custom web component (a non-ui component kinda like a DataSet) and so far it's working. When my web component is added to the web form in the designer from the toolbox, the namespace for my component is automatically added to the using directive of the codebehind. And, the appropriate assembly is added to the "References" for the Web form's project. However, my custom component has a field (initialized to null, and...
2
1228
by: Husam | last post by:
Hi EveryBody: I have the following code which just helpfull with Notepad: Code: <DllImport("user32", CharSet:=CharSet.Auto, SetLastError:=True)> _ Public Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As Integer ' End Function
19
1943
by: alice | last post by:
I'm just learning php, and one of the first things in the book I'm reading has me make this file- <html> <head> <title>PHP Test</title> </head> <body> <p>This is an HTML line <p> <?php
5
2552
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have start web form and when the user clicks a button (server.transfer) they are directed to the second webform. I was wondering if there is a way to create an instance of the first webform on the second webform? I have a base webform class that both webforms inherit webform1 : BaseWebclass webform2 :BaseWebclass so I do not think I can just inherit webform1 in webform2 thanks --
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.