How do I remove viewstate value when opened in notepad?

Hi,

Can the viewstate value be removed when a .doc file is opened in notepad?

Thanks,
G

Hi
Thanks for your inquiry. I think that you can’t determine which of the applications is used to open a file on client side.
Please let me know if you would like to know something else.
Best regards.

Hi,

I understand that any application can be used to open the file, but can I do something to ensure that the viewstate value is removed, prior to the file being downloaded and opened?

Thanks,
G

Hi
I think that you can use the Clear method to clear your ViewState. See the following code snippet.
ViewState.Clear();
I hope that this will help you.
Best regards.

Hi,

I have tried the above code snippet and it makes no difference at all, ViewState value still appears if the download doc is opened in notepad?

Thanks,
G

Hi
You can try to use the following code to clear ViewState variable.

ViewState["YourVariableName"] = null;

Also note that this question isn’t related with Aspose.Words.
Best regards.