Showing posts with label button1. Show all posts
Showing posts with label button1. Show all posts

Saturday, March 24, 2012

The directory name is invalid

In VS2005 I drop a button and a dropdownlist on a web form.
When I try to change the name of these (i.e. from Button1 to btnEdit)
in the Properties panel, I get a message popping up saying "The
directory name is invalid." and it won't let me change the
name.
Any Ideas?Actually I had a problem like that once with the Beta program, I closed the
solution, open again and I was able to rename it, what version of the VS2005
are you running and did you try that?
Cheers
Al
"jhcorey@.yahoo.com" wrote:

> In VS2005 I drop a button and a dropdownlist on a web form.
> When I try to change the name of these (i.e. from Button1 to btnEdit)
> in the Properties panel, I get a message popping up saying "The
> directory name is invalid." and it won't let me change the
> name.
> Any Ideas?
>

The directory name is invalid

In VS2005 I drop a button and a dropdownlist on a web form.
When I try to change the name of these (i.e. from Button1 to btnEdit)
in the Properties panel, I get a message popping up saying "The
directory name is invalid." and it won't let me change the
name.
Any Ideas?Actually I had a problem like that once with the Beta program, I closed the
solution, open again and I was able to rename it, what version of the VS2005
are you running and did you try that?

Cheers
Al

"jhcorey@.yahoo.com" wrote:

> In VS2005 I drop a button and a dropdownlist on a web form.
> When I try to change the name of these (i.e. from Button1 to btnEdit)
> in the Properties panel, I get a message popping up saying "The
> directory name is invalid." and it won't let me change the
> name.
> Any Ideas?
>

Thursday, March 22, 2012

The Focus() method dont work

As title, druing a button-click post back, I set a control, say Button1, to get the focus by Button1.Focus();

However, after the page is rendered, the Button1 still do not gets the focus as if browser window itself gets the focus instead.

Could any body give me some tips the find out the problem?

Note: The page is copied from an existing one and do some modification.

Thanks a lot

Ricky

Regards

it could be that the page is focusing somewhere else due to javascript, or just the browser...

but if you add the following code to your page, you should be able to re-focus where you want it... (add this code at the bottom of your page with the Page.ClientScript.RegisterStartupScript method):

setTimeout(function() { document.getElementById("myTextBox's Client Side ID here...").focus(); }, 250); <-- this will do it after 250 milliseconds (adjust to your needs).

Peace,


Nullable:

it could be that the page is focusing somewhere else due to javascript, or just the browser...

but if you add the following code to your page, you should be able to re-focus where you want it... (add this code at the bottom of your page with the Page.ClientScript.RegisterStartupScript method):

setTimeout(function() { document.getElementById("myTextBox's Client Side ID here...").focus(); }, 250); <-- this will do it after 250 milliseconds (adjust to your needs).

Peace,

Thanks. I have found the bug caused by the invalid HTML markups.

Ricky