B
brixdotnet
Hi there!
I made own user control for displaying and editing content. In
Page_Load of this control is checked if user is authorized for editing
if so, button for editing is shown, otherwise controll works in
display only mode. I want now use this control to add new content. The
idea is that in another web form, let's call AddNewContent.aspx there
is placed MyContentControl and I want to run in Editing mode with all
fields reset to defaults. How to do this with asp.net?
Normally I would do this using constructor and passing desired option
to a object during creation, but there are two things:
1. I got strange error when I defined contructor in MyContentControl,
2. And what's more important, where I am supposed to use this
constructor? In Page_Load of AddNewContent.aspx form it is too late.
Can you help me how to customize control apperance and behaviour
during user controll creation?
Best regards
B.
I made own user control for displaying and editing content. In
Page_Load of this control is checked if user is authorized for editing
if so, button for editing is shown, otherwise controll works in
display only mode. I want now use this control to add new content. The
idea is that in another web form, let's call AddNewContent.aspx there
is placed MyContentControl and I want to run in Editing mode with all
fields reset to defaults. How to do this with asp.net?
Normally I would do this using constructor and passing desired option
to a object during creation, but there are two things:
1. I got strange error when I defined contructor in MyContentControl,
2. And what's more important, where I am supposed to use this
constructor? In Page_Load of AddNewContent.aspx form it is too late.
Can you help me how to customize control apperance and behaviour
during user controll creation?
Best regards
B.