Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

Saturday, March 31, 2012

Set As Start Page

Hello All,
Can someone tell me why when I go to the Solution Explorer and try to set a
certain aspx page as the start page (Set As Start Page), it is grayed out?
Thanks :)Randy wrote:
> Hello All,
> Can someone tell me why when I go to the Solution Explorer and try to set
a
> certain aspx page as the start page (Set As Start Page), it is grayed out?
> Thanks :)
>
Some are, some aren't? or are you saying that option is always greyed out?
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Are you clicking on a file that can be set as a Start Page.
If i click on a .cs page, or a .ascx page, mine is also grayed out.
But when i right click on an .aspx page or .htm page it is not.
Just ensure your trying to set a valid page as a start page, and not a
invalid page like a control, config or class
"Randy" <temp@.temp.com> wrote in message
news:%23ERiqnPmFHA.3960@.TK2MSFTNGP12.phx.gbl...
> Hello All,
> Can someone tell me why when I go to the Solution Explorer and try to set
> a certain aspx page as the start page (Set As Start Page), it is grayed
> out?
> Thanks :)
>
Yes, you're right. I was asking for someone. What they did was add the .cs
files to the project and they were trying to right click on one of them to
Set As Start Page. I'm getting her to Exclude the .cs files and add the
.aspx files. I'm thinking that should do it. Thanks for your help.
"Grant Merwitz" <grant@.workshare.com> wrote in message
news:uT3rSrPmFHA.572@.TK2MSFTNGP15.phx.gbl...
> Are you clicking on a file that can be set as a Start Page.
> If i click on a .cs page, or a .ascx page, mine is also grayed out.
> But when i right click on an .aspx page or .htm page it is not.
> Just ensure your trying to set a valid page as a start page, and not a
> invalid page like a control, config or class
> "Randy" <temp@.temp.com> wrote in message
> news:%23ERiqnPmFHA.3960@.TK2MSFTNGP12.phx.gbl...
>
I was asking for a friend. I think she added the .cs files to the project
instead of the .aspx.
Thanks
"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:ehL0xpPmFHA.2920@.TK2MSFTNGP14.phx.gbl...
> Randy wrote:
> Some are, some aren't? or are you saying that option is always greyed out?
> --
> Curt Christianson
> site: http://www.darkfalz.com
> blog: http://blog.darkfalz.com
well, smack yout friend on the hand and say "Bad Friend" :)
Just kidding.
"Randy" <temp@.temp.com> wrote in message
news:%23%23NFX%23PmFHA.4000@.TK2MSFTNGP12.phx.gbl...
> Yes, you're right. I was asking for someone. What they did was add the .cs
> files to the project and they were trying to right click on one of them to
> Set As Start Page. I'm getting her to Exclude the .cs files and add the
> .aspx files. I'm thinking that should do it. Thanks for your help.
>
> "Grant Merwitz" <grant@.workshare.com> wrote in message
> news:uT3rSrPmFHA.572@.TK2MSFTNGP15.phx.gbl...
>
Randy wrote:
> I was asking for a friend. I think she added the .cs files to the project
> instead of the .aspx.
That'll do it. :}
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

Set As Start Page

Hello All,
Can someone tell me why when I go to the Solution Explorer and try to set a
certain aspx page as the start page (Set As Start Page), it is grayed out?

Thanks :)Randy wrote:
> Hello All,
> Can someone tell me why when I go to the Solution Explorer and try to set a
> certain aspx page as the start page (Set As Start Page), it is grayed out?
> Thanks :)

Some are, some aren't? or are you saying that option is always greyed out?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Are you clicking on a file that can be set as a Start Page.

If i click on a .cs page, or a .ascx page, mine is also grayed out.

But when i right click on an .aspx page or .htm page it is not.

Just ensure your trying to set a valid page as a start page, and not a
invalid page like a control, config or class

"Randy" <temp@.temp.com> wrote in message
news:%23ERiqnPmFHA.3960@.TK2MSFTNGP12.phx.gbl...
> Hello All,
> Can someone tell me why when I go to the Solution Explorer and try to set
> a certain aspx page as the start page (Set As Start Page), it is grayed
> out?
> Thanks :)
Yes, you're right. I was asking for someone. What they did was add the .cs
files to the project and they were trying to right click on one of them to
Set As Start Page. I'm getting her to Exclude the .cs files and add the
..aspx files. I'm thinking that should do it. Thanks for your help.

"Grant Merwitz" <grant@.workshare.com> wrote in message
news:uT3rSrPmFHA.572@.TK2MSFTNGP15.phx.gbl...
> Are you clicking on a file that can be set as a Start Page.
> If i click on a .cs page, or a .ascx page, mine is also grayed out.
> But when i right click on an .aspx page or .htm page it is not.
> Just ensure your trying to set a valid page as a start page, and not a
> invalid page like a control, config or class
> "Randy" <temp@.temp.com> wrote in message
> news:%23ERiqnPmFHA.3960@.TK2MSFTNGP12.phx.gbl...
>> Hello All,
>> Can someone tell me why when I go to the Solution Explorer and try to set
>> a certain aspx page as the start page (Set As Start Page), it is grayed
>> out?
>>
>> Thanks :)
>>
I was asking for a friend. I think she added the .cs files to the project
instead of the .aspx.
Thanks

"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:ehL0xpPmFHA.2920@.TK2MSFTNGP14.phx.gbl...
> Randy wrote:
>> Hello All,
>> Can someone tell me why when I go to the Solution Explorer and try to set
>> a certain aspx page as the start page (Set As Start Page), it is grayed
>> out?
>>
>> Thanks :)
> Some are, some aren't? or are you saying that option is always greyed out?
> --
> Curt Christianson
> site: http://www.darkfalz.com
> blog: http://blog.darkfalz.com
well, smack yout friend on the hand and say "Bad Friend" :)

Just kidding.

"Randy" <temp@.temp.com> wrote in message
news:%23%23NFX%23PmFHA.4000@.TK2MSFTNGP12.phx.gbl.. .
> Yes, you're right. I was asking for someone. What they did was add the .cs
> files to the project and they were trying to right click on one of them to
> Set As Start Page. I'm getting her to Exclude the .cs files and add the
> .aspx files. I'm thinking that should do it. Thanks for your help.
>
> "Grant Merwitz" <grant@.workshare.com> wrote in message
> news:uT3rSrPmFHA.572@.TK2MSFTNGP15.phx.gbl...
>> Are you clicking on a file that can be set as a Start Page.
>>
>> If i click on a .cs page, or a .ascx page, mine is also grayed out.
>>
>> But when i right click on an .aspx page or .htm page it is not.
>>
>> Just ensure your trying to set a valid page as a start page, and not a
>> invalid page like a control, config or class
>>
>> "Randy" <temp@.temp.com> wrote in message
>> news:%23ERiqnPmFHA.3960@.TK2MSFTNGP12.phx.gbl...
>>> Hello All,
>>> Can someone tell me why when I go to the Solution Explorer and try to
>>> set a certain aspx page as the start page (Set As Start Page), it is
>>> grayed out?
>>>
>>> Thanks :)
>>>
>>
>>
Randy wrote:
> I was asking for a friend. I think she added the .cs files to the project
> instead of the .aspx.

That'll do it. :}

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

Monday, March 26, 2012

Set focus

When my page is shown, I want the first textfield to have the focus. I found somewhere a solution for this :

in the page_load I call a routine :

SetFocusControl(Page, Me.txtNr.ID.ToString)

... and the SetFocusControl-routine :

Public Sub SetFocusControl(ByRef Pagina As System.Web.UI.Page,
ByVal ControlName As String)
' character 34 = "

Dim script As String = _
"<script language=" + Chr(34) + "javascript" + Chr(34) _
+ ">" + _
" var control = document.getElementById(" + Chr(34) + _
ControlName + Chr(34) + ");" & _
" if( control != null ){control.select();}" & _
"</script>"

Pagina.RegisterStartupScript("Focus", script)

End Sub

Now, all this works fine (field gets the focus and the whole contents is selected), but when I push TAB the focus goes to the Address-bar instead of the second textfield ??

Any idea why ? Are is there another 'better' solution to do this ?You need to set the tabindex property for each control on the page.

DJ
I don't know if this works, but I wonder why I haven't any problem when I go manualy (with mouse-click) to this first field and push on the TAB (this results correctly to the next field) ? So why not the first time ?

PS : all tabindexes are set to 0 for the moment.
In IE the address bar (unless otherwise specified) is the first to go to when you press tab. So I'm presuming because you haven't set tabindexes it will revert to the address bar again. Give it a try changing the tabindexes - I'm sure thats the problem.

DJ
Sorry, it's a long time ago but I become a father meanwhile...

I fill in the tabindex (login, password, persistent cookie and submit button), but it still goes to the address bar :cry:

Here's the HTML :

<body>
<form id="Form1" method="post" runat="server">
<H1 align="left"><FONT size="7"><IMG src="http://pics.10026.com/?src=Images/PROFORTRA.jpg"></FONT></H1>
<H1 align="left"><FONT size="7">Welcome</FONT></H1>
<H2 align="left">To access this site you have to log on first.</H2>
<P>
<TABLE class="TABLE" id="tlbLogin" style="WIDTH: 560px; HEIGHT: 130px" cellSpacing="1"
cellPadding="1" width="560" border="0">
<TR>
<TD style="WIDTH: 91px">Username
</TD>
<TD><asp:textbox id="UserName" tabIndex="1" runat="server" BackColor="LightGray" Width="160px"></asp:textbox> <asp:requiredfieldvalidator id="reqUserName" runat="server" ErrorMessage="Username is required !" ControlToValidate="UserName"></asp:requiredfieldvalidator></TD>
</TR>
<TR>
<TD style="WIDTH: 91px">Password</TD>
<TD><asp:textbox id="PassWord" tabIndex="2" runat="server" BackColor="LightGray" Width="160px" TextMode="Password"></asp:textbox> <asp:requiredfieldvalidator id="reqPassWord" runat="server" ErrorMessage="Password is required !" ControlToValidate="PassWord"></asp:requiredfieldvalidator></TD>
</TR>
<tr>
<td>Persistent Cookie</td>
<td><ASP:CHECKBOX id="Persist" tabIndex="3" runat="server"></ASP:CHECKBOX></td>
</tr>
</TABLE>
</P>
<P><asp:label id="lblFout" runat="server" ForeColor="Red" Font-Size="Medium"></asp:label></P>
<P><asp:button id="btnLogOn" tabIndex="4" runat="server" Text="Log On"></asp:button></P>
</form>
</body>
First off - congratulations!

Secondly - does this happen in all browsers?

DJ
Thx !

Since I'm just starting, I just try it on my notebook with IE (version 6.0.2900.2180).