Click to See Complete Forum and Search --> : ASP.net || (s As Object, e As EventArgs)? ANSWER PLEASE! posted 3x in last week


Sux0rZh@jc0rz
09-17-2003, 04:14 PM
kay. im using www.w3schools.com to learn asp.net and so far i'v learned a ton about it's structure and the most common commands, but i don't quite know the functions yet. like, I know how to add all the form objects but i'm not aquainted with all the functions like in this:

<script runat="server">
Sub Page_Load
if Not Page.IsPostBack then
lbl1.Text="The date and time is " & now()
end if
End Sub

Sub submit(s As Object, e As EventArgs)
lbl2.Text="Hello World!"
End Sub
</script>

I understand the <script runat="server> and i know how to use the sub page_load and Page.IsPostBack parts but not all the functions like & now() ...see?

I also don't know how to do the
Sub submit(s As Object, e As EventArgs)
lbl2.Text="Hello World!"
End Sub

submit is an onclick="do this function" but i don't understand the (s as Object, e as EventArgs)

care to explain that part? i assume its asp.net's version of specifying what is to be changed but I don't see how it is s or e.. S being the object to change and E being the thing to change it to mayby? not sure how they came up with S or E...

Ribeyed
09-17-2003, 05:42 PM
hi,
stop posting the same question, again and again. This forum is mainly classic ASP with very few ASP.NET developers. If you are desperate to find an answer it would be a good idea to search the resources on .NET at microsofts web site.

PeOfEo
09-17-2003, 05:43 PM
Just get used to that part and meorize it, its not going to have a profound affect on the rest of your asp.net experience. (s As Object, e As EventArgs) is pretty much just specifying the event that took place.
EDIT: Ribeyed nice to have you back, the number of people using .net is growing around here I am pusing for a .net forum, I think it would be nice to have one. Pyro says we should just post all the asp.ne stuff here with asp.net in the title though.

Sux0rZh@jc0rz
09-17-2003, 05:49 PM
yes but it isnt always (s As Object, e As EventArgs) sometimes it changes... what is the reason behind that?

PeOfEo
09-17-2003, 08:11 PM
The reason is a different even has happend. When you click on a button it is different from when the page loads.