Jump to content

Asp.net user controls

- - - - -

  • Please log in to reply
No replies to this topic

#1
mayasmitha

mayasmitha

    Newbie

  • Members
  • PipPip
  • 13 posts
Hi,

I have a custom server control (class1.cs) which will create textbox and dropdown lists as per the properties defined in default.aspx.cs as either String or Enum..The property with String type will generate textbox and either Enum it will genarate dropdown box in the usercontrol. I have asp.net panel and two buttons(textboxbtn,drpdwnlistbtn) in default.aspx which will render the currespondng control(textbox and dropdownlist). and AJAX is enabled to avoid postback when the buttons are clicked.

My problem is, I click on textbtn and i get the textbox on my usercontrol..i enter a text inside it and click on drpdwnlistbtn which will show the dropdownlist on my usercontrol.Now i clcik on textbtn again..and the text which i entered is not there. Its forgetting the last entered value on the textbox..similarly with dropdown list.

can any1 guide me how can i save the last entered values as i click buttons? how can i use sessions in (class1.cs)?

Regards,
Mayasmitha




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users