Controlling Controls in Codebehind - Tutorial File

H

HarryS

Hi,

Just wondering if someone can point me in the direction of a good
tutorial.

Today I was trying to come up with a way of controlling an
asp:adrotator in the codebehind file, as I wanted the keyword to
change depending on what part of the site they were on.

An example of what I want to happen in an ideal world:
So on the Page_Load function i put a line 'AdCreated.ChangeWord();'
Which went to:
public class AdCreated {
public void ChangeWord() {

adfile.KeyWord = "hompage";

Now it seems I have to learn all about static functions(?) and
creating a new instance first(?), so if someone could point me in the
right direction that would be cool.

(Dont need someone to write the code out, as otherwise i'll never
learn 'how it all works', just a good simple tutorial would be good.)
Ive got the basics of coding within the page, but now Im looking to
step up a gear and control everything from a codebehind sheet.

Thanks In Advance
H
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top