Problem with Type Converter

  • Thread starter Thread starter J.Edwards
  • Start date Start date
J

J.Edwards

I have a Type Converter working correctly from the designer end - it
displays a list of certain object types, and allows one to be picked, and
saves it to the property fine.

The trouble I have is when I run the web page it doesn't have the property
persisted in the actual live running of it. Is this a common problem? Any
suggestions on how to fix it?
 
Hi J.Edwards,

Although web application is stateless, one solution is ViewState. You can
use ViewState to keep variables alive after rendering to client then
postback. Following is a sample:

private int PageID
{
get{return (int)ViewState[“pageIdâ€];}
set{ViewState[“pageIdâ€] = value;}
}

HTH

Elton Wang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top