Click here to Skip to main content
15,887,485 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: dynamic bind GridView Pin
samMaster25-Apr-08 20:18
samMaster25-Apr-08 20:18 
Generalcreating an output file and manipulating the data in the output file Pin
Programmer9925-Apr-08 12:23
Programmer9925-Apr-08 12:23 
GeneralRe: creating an output file and manipulating the data in the output file Pin
Christian Graus25-Apr-08 20:23
protectorChristian Graus25-Apr-08 20:23 
GeneralSubmit Button and TextBox Pin
Ekjon25-Apr-08 10:19
Ekjon25-Apr-08 10:19 
GeneralRe: Submit Button and TextBox Pin
AlexeiXX325-Apr-08 14:10
AlexeiXX325-Apr-08 14:10 
GeneralRe: Submit Button and TextBox Pin
Ekjon25-Apr-08 19:02
Ekjon25-Apr-08 19:02 
GeneralRe: Submit Button and TextBox Pin
AlexeiXX326-Apr-08 7:20
AlexeiXX326-Apr-08 7:20 
GeneralRe: Submit Button and TextBox Pin
Ekjon26-Apr-08 8:19
Ekjon26-Apr-08 8:19 
Hi,

I tried both Page.SetFocus(..) and Form.DefaultFocus = ..

They work fine, the problem is: I have a LinkButton that shows and hides the panel. The focus works if the panel is initially visible - then if the link is clicked to hide it, the focus doesn't come back when the panel is visible again.
On the other hand, if the panel is not initially visible - then the focus never works. Here's my code, the first one in the Page Load:
<br />
        if (Page.IsPostBack)<br />
        {<br />
            if (pnlSearch.Visible == true)<br />
            {<br />
                Page.SetFocus(txtSearch);<br />
                //form1.DefaultFocus = "txtSearch";<br />
            }<br />
        }<br />
    protected void lnkSearch_Click(object sender, EventArgs e)<br />
    {<br />
        pnlSearch.Visible = !pnlSearch.Visible;<br />
        if (pnlSearch.Visible == true)<br />
        {<br />
            Page.SetFocus(txtSearch);            <br />
            //form1.DefaultFocus = "txtSearch";<br />
        }<br />
    }

Part of the problem could be - I am using AJAX's UpdatePanel.

I am embarrassed to ask these trivial questions.

Ekjon
GeneralCreating a Menu with the Menu object Pin
dptalt25-Apr-08 8:40
dptalt25-Apr-08 8:40 
AnswerRe: Creating a Menu with the Menu object Pin
samMaster25-Apr-08 23:44
samMaster25-Apr-08 23:44 
GeneralRe: Creating a Menu with the Menu object Pin
dptalt28-Apr-08 9:19
dptalt28-Apr-08 9:19 
QuestionPersonality Profilling with ASP.NET? Pin
Taurian11025-Apr-08 4:55
Taurian11025-Apr-08 4:55 
AnswerRe: Personality Profilling with ASP.NET? Pin
Krazy Programmer25-Apr-08 6:08
Krazy Programmer25-Apr-08 6:08 
JokeRe: Personality Profilling with ASP.NET? Pin
Taurian11025-Apr-08 9:27
Taurian11025-Apr-08 9:27 
QuestionChanging Date Format Pin
munklefish25-Apr-08 4:40
munklefish25-Apr-08 4:40 
GeneralRe: Changing Date Format Pin
Taurian11025-Apr-08 5:25
Taurian11025-Apr-08 5:25 
GeneralRe: Changing Date Format Pin
Blue_Boy25-Apr-08 9:17
Blue_Boy25-Apr-08 9:17 
GeneralRe: Changing Date Format Pin
munklefish28-Apr-08 0:24
munklefish28-Apr-08 0:24 
GeneralRe: Changing Date Format Pin
Blue_Boy28-Apr-08 0:45
Blue_Boy28-Apr-08 0:45 
GeneralRe: Changing Date Format Pin
munklefish28-Apr-08 0:50
munklefish28-Apr-08 0:50 
GeneralDiv inside another div not sizing correctly in the user control Pin
gottimukkala25-Apr-08 4:14
gottimukkala25-Apr-08 4:14 
GeneralRe: Div inside another div not sizing correctly in the user control Pin
Taurian11025-Apr-08 5:04
Taurian11025-Apr-08 5:04 
GeneralRe: Div inside another div not sizing correctly in the user control Pin
gottimukkala25-Apr-08 5:17
gottimukkala25-Apr-08 5:17 
GeneralRe: Div inside another div not sizing correctly in the user control Pin
Taurian11025-Apr-08 5:19
Taurian11025-Apr-08 5:19 
GeneralRe: Div inside another div not sizing correctly in the user control Pin
gottimukkala25-Apr-08 5:36
gottimukkala25-Apr-08 5:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.