I have almost every piece of code, I just need it to be optimized using correct IF_ELSE conditions and arranging the right flow.
I have a webform (UserProfile.aspx), which contains FormView (to display user profile).
In FormView ItemTemplate, I have put simple HTML and ASP.Net Labels to display Info using Label's Text property :
In EditItemTemplate, I have same table but with textboxes instead of Labels.
I have a button "Edit", on its Click event, I'm changing FormViewMode
I have another button "Cancel", on its Click event, I'm changing FormViewMode
To display user profile, I'm passing user-id from querystring
So the valid URL looks like :
What I want to achieve is :
If (querystring_is_EMPTY OR querystring_field_is_incorrect OR user_IS_NOT_Logged_IN)
If (user_IS_Logged_In AND querystring_is_exist)
If (querystringvalue != logged_in_user_id)
I'm thinking to add an UpdatePanel around the FormView Once I achieve above tasks, for consistent look.
I know the problem is quite difficult to understand so feel free to ask details. I will provide the code as needed.