Create sign out button in master page in ASP.Net

时间:2018-06-20 05:01:01

标签: asp.net

I am trying to create a master page with a sign out button. And to clear session on sign out button, I need to wrap that button in a form tag. Pretty straight forward, right?

Problem is that the content page will have their own form tag as well. So, application crashes saying "page can have only one form".

Now, I need to figure out a way to have that sign out button make a server side call without using form tag. How can I achieve this?

As of now, I have two ideas in mind. First is to redirect to an intermediary log out page. Second is to wrap the whole master page in a form, so content page will never need a form tag. Is there a better way to acheive this?

0 个答案:

没有答案