Click here to Skip to main content
15,913,027 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: can i know which checkbox caused the postback ? Pin
Mohammed Amine28-Jul-06 0:54
Mohammed Amine28-Jul-06 0:54 
AnswerRe: can i know which checkbox caused the postback ? Pin
Khawar Abbas127-Jul-06 23:42
Khawar Abbas127-Jul-06 23:42 
QuestionHow do I Fill a dropdownlist with respect to another dropdownlist added in Gridview as template field Pin
Vijookb27-Jul-06 7:54
Vijookb27-Jul-06 7:54 
AnswerRe: How do I Fill a dropdownlist with respect to another dropdownlist added in Gridview as template field Pin
Not Active27-Jul-06 8:00
mentorNot Active27-Jul-06 8:00 
QuestionComplex security + role based Pin
chopps27-Jul-06 7:47
chopps27-Jul-06 7:47 
AnswerRe: Complex security + role based Pin
eggsovereasy27-Jul-06 9:46
eggsovereasy27-Jul-06 9:46 
GeneralRe: Complex security + role based Pin
chopps27-Jul-06 11:46
chopps27-Jul-06 11:46 
QuestionDynamically created controls disappearing Pin
toptone7827-Jul-06 6:38
toptone7827-Jul-06 6:38 
Hi,
I am trying to sort out creating dynamically created buttons.
For example, i have an input button (HtmlInputSubmit) on my page. This has onserverclick="click1" say.

click1 will then dynamically create another HtmlInputSubmit button, e.g.:
HtmlInputSubmit b = new HtmlInputSubmit();
b.Value = "mmm";
b.ID = "testID";
b.Load += new EventHandler(click2);
b.ServerClick += new EventHandler(click2);

click2 would then do something (e.g. change this new HtmlInputSubmit button's text. I would only use either b.Load or b.ServerClick.

My problem is that if i use b.ServerClick, run the page, when i click on the dynamically created button with text "mmm" the page reloads and the button disappears without calling the click2 method. If i use b.Load click2 gets called when i click on the original button to create the new button, so it gets created with text "new text".

Am i right in thinking that the button is disappearing because of something to do with the viewstate? I want to be able to assign this new button an onclick(onserverclick) event, but at the moment i can't because it keeps disppearing if i click it.

Can anyone help?
Thanks.
AnswerRe: Dynamically created controls disappearing Pin
ToddHileHoffer27-Jul-06 6:59
ToddHileHoffer27-Jul-06 6:59 
GeneralRe: Dynamically created controls disappearing Pin
toptone7827-Jul-06 7:42
toptone7827-Jul-06 7:42 
GeneralRe: Dynamically created controls disappearing Pin
toptone7827-Jul-06 7:49
toptone7827-Jul-06 7:49 
GeneralRe: Dynamically created controls disappearing Pin
ToddHileHoffer27-Jul-06 7:57
ToddHileHoffer27-Jul-06 7:57 
QuestionDatagrid Pin
sunilkgopinath27-Jul-06 6:37
sunilkgopinath27-Jul-06 6:37 
AnswerRe: Datagrid Pin
ToddHileHoffer27-Jul-06 6:56
ToddHileHoffer27-Jul-06 6:56 
QuestionMaster page menu click event handleable by content? Pin
Member 9627-Jul-06 5:56
Member 9627-Jul-06 5:56 
AnswerRe: Master page menu click event handleable by content? Pin
Not Active27-Jul-06 6:09
mentorNot Active27-Jul-06 6:09 
AnswerRe: Master page menu click event handleable by content? [modified] Pin
ToddHileHoffer27-Jul-06 6:17
ToddHileHoffer27-Jul-06 6:17 
GeneralRe: Master page menu click event handleable by content? Pin
Member 9628-Jul-06 4:57
Member 9628-Jul-06 4:57 
AnswerRe: Master page menu click event handleable by content? Pin
minhpc_bk27-Jul-06 16:13
minhpc_bk27-Jul-06 16:13 
Questionhey , i wanna select multiple rows in the gridview Pin
Mohammed Amine27-Jul-06 5:39
Mohammed Amine27-Jul-06 5:39 
AnswerRe: hey , i wanna select multiple rows in the gridview Pin
Not Active27-Jul-06 6:00
mentorNot Active27-Jul-06 6:00 
GeneralRe: hey , i wanna select multiple rows in the gridview Pin
Mohammed Amine27-Jul-06 6:05
Mohammed Amine27-Jul-06 6:05 
QuestionI want to only allow users to use IE exclusively Pin
widget127-Jul-06 5:13
widget127-Jul-06 5:13 
AnswerRe: I want to only allow users to use IE exclusively Pin
_AK_27-Jul-06 5:15
_AK_27-Jul-06 5:15 
GeneralRe: I want to only allow users to use IE exclusively Pin
Colin Angus Mackay27-Jul-06 5:57
Colin Angus Mackay27-Jul-06 5:57 

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.