473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

aspx.vb file question

Hello,

I have an aspx page which in its script has:

Sub Page_Load(...)
...
End Sub

And 2 functions:

A DataSet Function:

Function dsContent(ByVal page As String) As System.Data.DataSet
...
Return dataSet
End Function

And a function created by me:

Sub changeCulture(culture As String)
Session("culture") = culture
Thread.CurrentThread.CurrentCulture = New CultureInfo(culture)
End Sub

Can and should I move all them to an aspx.vb file?
What changes should be made?

I never used an aspx.vb file.
An example or tips of how to move these functions to an aspx.vb file it
would be of great help.

Thank You Very Much,
Miguel

Nov 19 '05 #1
2 1134
If you are using Visual Studio you can simply open the .aspx page, then click
View--Code from the menu. This will automatically take you to a aspx.vb page
and regisiter it on the .aspx page.

Whether or not you choose to use an aspx.vb file is up to you. As a general
rule, it is probably a good practice as it helps extract your business logic
from your presentation logic.

"Shapper" wrote:
Hello,

I have an aspx page which in its script has:

Sub Page_Load(...)
...
End Sub

And 2 functions:

A DataSet Function:

Function dsContent(ByVal page As String) As System.Data.DataSet
...
Return dataSet
End Function

And a function created by me:

Sub changeCulture(culture As String)
Session("culture") = culture
Thread.CurrentThread.CurrentCulture = New CultureInfo(culture)
End Sub

Can and should I move all them to an aspx.vb file?
What changes should be made?

I never used an aspx.vb file.
An example or tips of how to move these functions to an aspx.vb file it
would be of great help.

Thank You Very Much,
Miguel

Nov 19 '05 #2
Hello,

I am using Web Matrix.
So Visual Studio generates the aspx.vb file?

Could someone do it for one of my aspx files so I get a reference that I
can look to? Or maybe give me the basic structure and rules of how to do
this.

Thanks,
Miguel
"sstevens" <ss******@discussions.microsoft.com> wrote in message
news:ss******@discussions.microsoft.com:
If you are using Visual Studio you can simply open the .aspx page, then click
View--Code from the menu. This will automatically take you to a aspx.vb page
and regisiter it on the .aspx page.

Whether or not you choose to use an aspx.vb file is up to you. As a general
rule, it is probably a good practice as it helps extract your business logic
from your presentation logic.

"Shapper" wrote:

Hello,

I have an aspx page which in its script has:

Sub Page_Load(...)
...
End Sub

And 2 functions:

A DataSet Function:

Function dsContent(ByVal page As String) As System.Data.DataSet
...
Return dataSet
End Function

And a function created by me:

Sub changeCulture(culture As String)
Session("culture") = culture
Thread.CurrentThread.CurrentCulture = New CultureInfo(culture)
End Sub

Can and should I move all them to an aspx.vb file?
What changes should be made?

I never used an aspx.vb file.
An example or tips of how to move these functions to an aspx.vb file it
would be of great help.

Thank You Very Much,
Miguel


Nov 19 '05 #3

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

Similar topics

6
by: Ted Singh | last post by:
(I apologize in advance if this is an obvious question, my experience is more with console or client-only apps) I am trying to build an web-based HTML UI, which will work with a web-server on...
6
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
2
by: kermit | last post by:
I have an .net aspx page MyPage.aspx (client side), with code behind MyPage.aspx.vb (server side) I use the pages server On_Load event (.aspx.vb) to create a collection using classes. ...
4
by: TWEB | last post by:
I think I may have an IIS / ASP.Net Configuration issue that I need some guidance with resolving. Here's the problem: a) I have a .stm file. b) I referenc a .aspx file on this .stm file using a...
10
by: bienwell | last post by:
Hi, I have a question about file included in ASP.NET. I have a file that includes all the Sub functions (e.g FileFunct.vb). One of the functions in this file is : Sub TestFunct(ByVal...
24
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX...
11
by: Jan | last post by:
Hi, I defined a function like this: Public Function myfunction(ByVal myvar As Object) As String ... Return xyz End Function in aspx file, i use it like this:
3
by: =?Utf-8?B?QnJhbmRvbg==?= | last post by:
Hi, I have an aspx page that has the "include" code in it which includes another page that displays information. I also have an upload page that allows users to upload a simple html document...
16
by: flip2flik | last post by:
Hi. I am using visual web developer express edition and I am using vb.net as the programming language. I want to create a new aspx file on a button click. I will have a template that the new...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.