Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect from dotvvm page to aspx page #1866

Open
dhavalcharadva-sf opened this issue Sep 30, 2024 · 2 comments
Open

Redirect from dotvvm page to aspx page #1866

dhavalcharadva-sf opened this issue Sep 30, 2024 · 2 comments

Comments

@dhavalcharadva-sf
Copy link

Hi Team,

I am converting one of the Web Form pages. And I want to redirect from viewmodel to existing aspx pages until it get converted. But I couldn't do it.

I have used Session.Redirect but its not working correctly.

Could someone tell me correct way?

@exyi
Copy link
Member

exyi commented Sep 30, 2024

You cannot unfortunately use WebForms primitives in DotVVM pages, but you might be interested in the adapters package (https://www.nuget.org/packages/DotVVM.Adapters.WebForms). It adds the context.RedirectToRouteHybrid method, which redirect to WebForms or DotVVM route, depending on which one exists. You can also use the context.RedirectToUrl method to redirect to any URL from DotVVM page.

More info about the adapters package is in https://www.dotvvm.com/blog/48/Announcing-DotVVM-Adapters-for-ASP-NET-Web-Forms. I'll leave this open, as we should add a page to the documentation.

@dhavalcharadva-sf
Copy link
Author

I have added the nuget package but mentioned extention methods are not exist in context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants