Click here to Skip to main content
15,891,951 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Using server.transfer Pin
minhpc_bk30-Jul-06 20:14
minhpc_bk30-Jul-06 20:14 
GeneralRe: Using server.transfer Pin
doyang2-Aug-06 22:28
doyang2-Aug-06 22:28 
AnswerRe: Using server.transfer Pin
AnjuV30-Jul-06 21:03
AnjuV30-Jul-06 21:03 
GeneralRe: Using server.transfer Pin
doyang26-Sep-06 15:46
doyang26-Sep-06 15:46 
AnswerRe: Using server.transfer Pin
Mairy31-Jul-06 23:11
Mairy31-Jul-06 23:11 
AnswerRe: Using server.transfer Pin
doyang2-Aug-06 22:33
doyang2-Aug-06 22:33 
QuestionRe: Using server.transfer [Follow-up] Pin
doyang2-Aug-06 22:35
doyang2-Aug-06 22:35 
QuestionProgrammically Adding Controls Pin
Drathmar30-Jul-06 15:42
Drathmar30-Jul-06 15:42 
I've come across this odd behavior, that I'm not quite sure what to make of it, or even how to determine the source of the problem.

Ok, I have one page.

3 different buttons on that page.

asp:Panel ID="PanelNew" runat="server" Width="97%" >

asp:button runat="server" text="MostRecent" OnCommand="SelectActiveView" CommandArgument="MostRecent" CommandName="Hide" />
asp:button runat="server" text="Most Recent 2" id="testbutton" />

/asp:Panel>

Then I had code in the page load that is:
<br />
<br />
        testbutton.Command += new CommandEventHandler(this.SelectActiveView);<br />
        testbutton.CommandArgument = "MostRecent";<br />
        testbutton.CommandName = "Hide";<br />
<br />
        Button TempButton = new Button();             <br />
        TempButton.Text = "Cancel";<br />
        TempButton.Command += new CommandEventHandler(this.SelectActiveView);<br />
        TempButton.CommandArgument = "MostRecent";<br />
        TempButton.CommandName = "Hide";<br />
        PanelNew.Controls.Add(TempButton);<br />


So, I have on that's declared in html, one that's declared in html then modified from code, then the last is complete code made, all three buttons end up having the same command arguements, but the one made from code behaves differently from the rest. The function they call, modifies some hiden value fields then calls a page load.

Ok, now this part, is hard to explain, so please stay with me.

If I go straight to that page from a link, all three buttons work, first try.

If I click on a button that does a post back on to the page, then I click on the tempbutton, the hidden field values are not updated, Then I click the same button a second time and it does update the hidden values like it was supposed to on the first click.

Well, I hope that made sense. If it didn't then post that and I'll see if i can post some source code to duplicate this behavior.

Drathmar
AnswerRe: Programmically Adding Controls Pin
minhpc_bk30-Jul-06 20:17
minhpc_bk30-Jul-06 20:17 
GeneralRe: Programmically Adding Controls Pin
Drathmar31-Jul-06 11:50
Drathmar31-Jul-06 11:50 
GeneralRe: Programmically Adding Controls Pin
minhpc_bk31-Jul-06 16:11
minhpc_bk31-Jul-06 16:11 
AnswerRe: weprte...[modified] Pin
Colin Angus Mackay30-Jul-06 12:19
Colin Angus Mackay30-Jul-06 12:19 
AnswerRe: I&#8217;m so sorry for this stupid forum. Pin
User 171649230-Jul-06 13:36
professionalUser 171649230-Jul-06 13:36 
GeneralRe: I&#8217;m so sorry for this stupid forum. Pin
RichardGrimmer31-Jul-06 1:37
RichardGrimmer31-Jul-06 1:37 
Questionelegant coding style - checkboxs Pin
MrJJKoolJ30-Jul-06 3:41
MrJJKoolJ30-Jul-06 3:41 
Questionhow to open a windows user control on asp.net page Pin
cvinod30-Jul-06 1:41
cvinod30-Jul-06 1:41 
AnswerRe: how to open a windows user control on asp.net page Pin
Ista4-Aug-06 3:31
Ista4-Aug-06 3:31 
QuestionProblem in seprate ui from code behind Pin
a33329-Jul-06 22:54
a33329-Jul-06 22:54 
GeneralRe: Problem in seprate ui from code behind Pin
Guffa29-Jul-06 23:05
Guffa29-Jul-06 23:05 
Questioninjecting controls Pin
sianatia29-Jul-06 21:59
sianatia29-Jul-06 21:59 
AnswerRe: injecting controls Pin
Guffa29-Jul-06 23:03
Guffa29-Jul-06 23:03 
GeneralRe: injecting controls Pin
sianatia30-Jul-06 18:51
sianatia30-Jul-06 18:51 
GeneralRe: injecting controls Pin
Ista3-Aug-06 8:48
Ista3-Aug-06 8:48 
AnswerRe: injecting controls Pin
Ista3-Aug-06 8:51
Ista3-Aug-06 8:51 
QuestionHow to set proxy Credentials to WebRequest ? Pin
VenkataRamana.Gali29-Jul-06 21:33
VenkataRamana.Gali29-Jul-06 21:33 

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.