473,625 Members | 2,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing collection data from aspx page - how?

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.

Public Class CollectionPage
Inherits Web.UI.Page


Nov 19 '05 #1
2 1301
I don't know where to start, kermit. More importantly, I don't know where to
tell YOU to start.

First, you begin by saying that you have a client-side ASPX Page, and a
server-side CodeBehind. This is incorrect. You have ONE server-side ASPX
Page class. Period. Until it receives a Request, there IS no client-side.
The MyPage.aspx file contains a class definition that is derived via
inheritance from the class definition in the MyPage.aspx.vb file. When they
are compiled, you have 2 classes. Only one is used. The "CodeBehind " is the
base class from which the ASPX class is inherited.

So, in conclusion, you need to learn how object-oriented programming works
before you can start programming. Think of it as a pyramid. If the bottom
level is missing pieces, the entire pyramid is going to fall over.

This is evidenced by the second thing you state, which is that you "create a
collection using classes," and show that you have created a class that
inherits NOT a Collection class, but System.Web.UI.P age." And your question
is how to access the "Collection " data from the ASPX page.

IOW, your question doesn't make sense because you don't understand the
programming technology you're working with.

Another way to look at it is, you're trying to do Trigonometry without any
understanding of Algebra. The only solution is to learn algebra first, or
you'll be swimming in circles until the cows come home.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"kermit" <ke****@discuss ions.microsoft. com> wrote in message
news:FD******** *************** ***********@mic rosoft.com...
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.

Public Class CollectionPage
Inherits Web.UI.Page

Nov 19 '05 #2
"kermit" <ke****@discuss ions.microsoft. com> wrote in message
news:FD******** *************** ***********@mic rosoft.com...
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.

Public Class CollectionPage
Inherits Web.UI.Page


?????
Nov 19 '05 #3

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

Similar topics

6
2735
by: Chris Styles | last post by:
Dear All, I've been using some code to verify form data quite happily, but i've recently changed the way my form is structured, and I can't get it to work now. Originally : The form is called "form1", and I have selects called "PORTA", "PORTB" ... etc...
6
3080
by: omyek | last post by:
I'm trying to mimic the browsing of a webpage using an HttpWebRequest. I've had a lot of luck with it so far, including logging into pages, posting form data, and even collecting and using cookies. However, I ran into a scenario that I'm baffled by. I have a website which requires a user to login. This is nothing new and I was able to successfully log in. For our case, let's say the URL to the login page is http://login.html
2
1455
by: James Zhuo | last post by:
Accessing Items in a Collection works with the as suggested by Kevin and Chris (thx) But when i tried to use the same technic with databinding within the aspx file, it doesn't seem to work. This is the aspx part that i am talking about <asp:DataGrid id="dgThreads" runat="server" AutoGenerateColumns="False"> <Columns> <asp:TemplateColumn HeaderText="Databases"> <ItemTemplate>
5
1979
by: Peter | last post by:
I have 3 ASP.NET forms written in C#, I also have 3 frames (left, top and bottom) one for each form. My question is if I have data on one form in the bottom frame how do I access this data when I click on the button which is on the top frame? I want to save the data from the bottom frame to the database when a user clicks on the Update button. Does anyone have an example on how to do this? ...
4
2049
by: John Holmes | last post by:
I'm using data to rename some web controls on a form that uses a repeater contol and so it can have mulitple instances of the same control set. The controls get renamed (thanks to Steven Cheng's help) in a click event of the button that is pushed to enter data. Each time the button is clicked it sends the ID entered by the user to query the database and return information. The renamed controls then include the ID in the name of the...
2
1633
by: kermit | last post by:
I have a .net aspx page MyPage.aspx (client side) with code behind MyPage.aspx.vb (server side). I use the Page_Load event in MyPage.aspx.vb to load data into a multiteir class based collection. MyCollection(sYear).cMonths(sMonth).cDays(sDay).cEvents(sID).EventText My problem arrives when I try to access this collection from the page (MyPage.aspx).
6
1785
by: Joe | last post by:
Hello All: I have a webform (WebForm1.aspx) that retrieves a value from a database (_formSessionId) the first time that it is posted. After the user filles in the form, he/she clicks a Button server control that ultimately redirects him/her to WebForm2.aspx . I need to persist the value of _formSessionId between the initial post and the postback (after the Button control is clicked). I would like to add the value to the QueryString...
7
2127
by: =?Utf-8?B?Li46OiBLZXZpbiA6Oi4u?= | last post by:
I have a problem with accessing controls that I have loaded dynamically and added to a web page. The scenario: I have a webpage that displays multiple instances of a user control on the page. The number of controls that are displayed can be adjusted by the user so the controls are added to the page dynamically using the following code in the Page_Init event handler: For i as Integer = 1 to NumberOfControls
8
10817
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList steps successfully with the following code... Control myContainer = (Control)Wizard1.FindControl("SideBarContainer"); DataList mySideBarList = (DataList)myContainer.FindControl("SideBarList");
0
8253
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
8189
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
8692
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4089
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...
1
2621
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
1
1802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1499
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.