Last post Feb 03, 2010 10:40 PM by ignatandrei
Feb 03, 2010 07:45 PM|kennethjohnsen|LINK
We have a ASP.NET user-control, that basically let's the user pick a project number from a list.
It gets the data from some backend store using a dll.
I want to use it in an ASP.NET MVC project, but I've read that it's not a good idea to put it on a view-page, since user controls only accepts one form-tag on the page.
So, I was wondering if I could put it in it's own "classic" aspx page, and then make a link to it on my view. Basically, have a "Select project-number" or something.
I know how to do that, and I wanna make it so it pops up in a new window.
Here's the question, then: When the user has used the control in the pop-up window, I want the window to close, and the selected project-number to appear in a textfield on my MVC view, but I don't know how to do this.
I'm thinking something like having a submit-button on the same form as the user-control ("Done choosing project-number" for example").
But how do I get the window to go away, and how do I transfer the selected number to the view?
user control mvc
Feb 03, 2010 10:40 PM|ignatandrei|LINK
With window.open you can open the new window, window1.
In window1, on button click, you call
window.opener.document.getElementByID(' ')= value of project;
Method 2, fast:
search for "jquery modal" and find a demo that can have a function to return value - like simplemodal