-
Notifications
You must be signed in to change notification settings - Fork 578
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
ViewBag initialization not possible outside of template #26
Comments
Hi John. No problem at all. The changes are minor. I will ZIP them up and send them to you once I comment them. I will get this done today. Thanks, Scott -----Original Message----- Scott, Thanks, John Reply to this email directly or view it on GitHub: |
Thanks Scott, looking forward to it. |
Hi John. Two things have delayed me.
I can ZIP and email you directly when I am done so you don't have to wait for the branch. I will email you when I have this 100% working via unit tests. Thanks, Scott |
Nice...thanks! Scott -----Original Message----- Reply to this email directly or view it on GitHub: |
Scott, John |
I have forked and pushed changes to this issue. git@github.com:scottnickel/RazorEngine.git Tag: 20120313_Issue26_Issue27 A pull request is pending. Scott |
Hi John. I FINALLY got my changes up there. I have forked and pushed changes to this issue. git@github.com:scottnickel/RazorEngine.git Tag: 20120313_Issue26_Issue27 A pull request is pending. Have a look and let me know if you find any problems. Thanks, Scott -----Original Message----- Hi John. No problem at all. The changes are minor. I will ZIP them up and send them to you once I comment them. I will get this done today. Thanks, Scott -----Original Message----- Scott, Thanks, John Reply to this email directly or view it on GitHub: |
Hi John. Can you send me the code where you create the HtmlHelper object? Thanks, Scott -----Original Message----- Scott, Thanks, John Reply to this email directly or view it on GitHub: |
I've got an implementation of @html and @url in the Will push soon I hope. |
That is what I am looking for. I have an MVC ViewEngine and View. The UrlHelper is easy and can be instantiated using information from HttpContext. My issue is: How does MvcTemplateBase() know what the current View & Controller is, so it can instantiate its HtmlHelper object internally when RazorEngine processes the ITemplate. I poked around HttpContext.Current and haven't found what I need. Any thoughts? If you want, send me what you have before push/pull and I will make sure it meets my needs. Thanks, Scott -----Original Message----- I've got an implementation of @html and @url in the Will push soon I hope. Reply to this email directly or view it on GitHub: |
Scott, John From: Scott Nickel reply@reply.github.com Hi John. Can you send me the code where you create the HtmlHelper object? Thanks, Scott -----Original Message----- Scott, Thanks, John Reply to this email directly or view it on GitHub: Reply to this email directly or view it on GitHub: namespace System.Web.Mvc {
} using System; namespace RazorEngine.Mvc
} |
Thanks, John. Was there an attachment or is in the repository? Thanks, Scott |
Intended to have an attachment... I'll inline it here.
MVCTemplateBaseOfT
|
Perfect. The old WebPageContext.Current.....just what I was looking for. Thanks! Scott |
Closed using pull request #36 |
The Parse/Run APIs do not provide a way to pass in ViewBag contents.
Only ViewBag properties set/get from the page will work.
I have extended the interfaces/classes with overloads to provide this functionality.
This will allow an application to initialize ViewBag contents before executing the template and the template @ViewBag will contain the initialized values.
Let me know if you would like me to upload those changes.
Scott
The text was updated successfully, but these errors were encountered: