It depends on what you mean by "the same thing". You can do a lot on the web of what you can do on Windows these days but there are still a number of limitations. There's also a big difference between the client/server nature of web applications and the all-in-one nature of Windows applications. Web Forms is intended to hide some of that difference but, as someone who came from Windows Forms myself, I always found Web Forms to feel quite unnatural and I much prefer MVC for the web.
You can probably build an equivalent application but whether everything is possible and how much you'll need to change depends on specifics. Also, if you have or were to separate your Wiondows application into projects for presentation, i.e. the UI, and another for business logic, then you will be able to use the same business logic DLL in both applications, making maintenance easier.