vs 2008 events missing

T

tshad

I just started using VS 2008 and found that some of the controls events are
gone.

I was using some controls from my 2003 page and got errors on:

button.enabled
button.Text

Both say they are not members of controls.

Why is that?

Thanks,

Tom
 
T

tshad

Munna said:
Hi

"found that some of the controls events are
gone. "

you are talking about property right?

some events on the data controls are changed
like

itemdatabound changed to rowdatabound in case of datagrid

but primitive stuff is not changed..

please check the converted project's namespaces again.

I was playing with it and figured out what it was. In the following:

addQuestionButton.enabled = True

I was setting a button variable to passed object:

Dim addQuestionButton = e.Item.FindControl("AddQuestion")

But this wasn't setting it to a button, I guess, until I changed it to:

Dim addQuestionButton = CType(e.Item.FindControl("AddQuestion"),
Button)

And then it worked fine.

I am kind of surprised that I didn't need an "As Button" in it like so:

Dim addQuestionButton As Button =
CType(e.Item.FindControl("AddQuestion"), Button)

Thanks,

Tom
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top