OK, i lied. It doesn't exactly work fine. Now the page_load isnt running...
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
OK, so whats with the inherits=""? I am now getting an error:
Could not load type 'orcas.myvnc.com.sel_store'.
Line 1: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="sel_store.aspx.vb" Inherits="orcas.myvnc.com.sel_store" %>
If I remove the inherits item, it works fine. do i need it?
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
You can either use one or the other code behind or inline coding
With code behind, you must have declared the label in your code behind page, much as you would any variable.Otherwise, telling it to put text in a particular label won't work.
To see how this is done - create a blank new VS.Net solution - then, using the designer, drag & drop a new label - then, switch over to the code behind page and see the statement created by VS.Net 'Web Form Designer Generated Code' section - -
David Wier
MCP, MVP ASP.NET, ASPInsider
http://aspnet101.com
http://aspexpress.com
Coming Soon - Data Management Toolkit
Manage MSDE/SQL Server/MySQL/MS Access Databases from one location.
http://augustwind.com/augustwind/dmt.aspx
When I remove the AutoEventWireup, I can use in page. I just tried it with codebehind, and the code stated lblTest is not declared, and I have it in the page as a label. How do I reference objects on the main page?
thanks,
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
Usually, developers either use one or the other.
I prefer inline over code behind, even though I do use .vb files for function libraries, quite often.
It mostly depends on the preferences of the developer.
I believe in the currently released version of VS.Net, you only get code behind ability.
David Wier
MCP, MVP ASP.NET, ASPInsider
http://aspnet101.com
Coming Soon - Data Management Toolkit
Manage MSDE/SQL Server/MySQL/MS Access Databases from one location.
http://augustwind.com/augustwind/dmt.aspx
http://aspexpress.com
Hmmm.. Interesting. Is there a benefit to using code behind instead of in the page? If not, how can I disable the codebehind option for all new pages?
thanks,
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
Hmm you are doing couple of things wrong. You said your page should use Codebehind, and you are writing the inline code for the Page_Load handler. so, place the Page_Load handler in the home.aspx.vb code behind file. When you have AutoEventWireup to true, it means the typical page events are wired up to the corresponding handlers automatically. So, your page is able to find Page_Load, which is the typical handler for "Load" event. Thats why it works. When you have it set to false, there is no handler for Load event specified, so nothing to execute
--
Kumar Reddi
http://kumarreddi.blogspot.com
I fixed it, i think. In the first line is this:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="home.aspx.vb" Inherits="orcas.myvnc.com.home"%>
I removed
AutoEventWireup="false"
and it worked fine. What is this for? I'm using VS.Net.
thanks!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
Howdy
My following script is not processing at all!
<script runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
lblWelcome.text = "hello"
End Sub
</script>
However, functions with onclicks, etc. work fine
thanks!