This is a migrated thread and some comments may be shown as answers.

[Solved] Login Window

3 Answers 154 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Toad
Top achievements
Rank 1
Toad asked on 05 Apr 2012, 01:35 PM
i m creating an application for which need a login which i want to be in a modal window; i want to load a view in window if possible, if not please tell me how do i do it, here is code in my login.cshtml
@{
    Html.Telerik().Window().Name("loginWindow").Modal(true).Title("Login").Content
(@<
text> @using(@Html.BeginForm("Login","UserAccountsManagement", FormMethod.Post))
                 {
                      @Html.EditorForModel()
                  })</text> );
         }
here is code from default.cshtml, which just calls above view,
@Html.ActionLink("Login", "Login", "UserAccountsManagement")

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 09 Apr 2012, 09:37 AM
Hello Toad,

You have two options - open a complete standalone page inside the Window with an iframe or use a partial view. The difference between the two approaches will be the log-in algorithm, which is not related to the Window component. In either case, you can configure the Window completely on the server side, or create it with Javascript on button click.

Kind regards,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
MICHAEL
Top achievements
Rank 1
answered on 01 Nov 2012, 01:25 PM
Hi Toad,

Did you ever get this working, can you share your solution?

I'm opening this partial view in the window and its not posting:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>

<% using (Html.BeginForm("HospitalEdit", "Hospital", FormMethod.Post))
   { %> 
        <%: Html.EditorForModel() %>
      
<% } %>
 <input type="submit" />


This is how I'm opening the window:
    function OpenHospitalWindow(id) {
        //debugger;
        var url = '<%= Url.Action("HospitalGetEdit", "Hospital") %>';
        $.post(url, { id: id }, function (data) {
            var window = $('#EditWindow').data('tWindow');
            //debugger;
            window.content(data);
            window.center().open();
        });
    }
0
Ryan
Top achievements
Rank 1
answered on 14 Jan 2013, 03:49 PM
Anyone get this working?
Tags
Window
Asked by
Toad
Top achievements
Rank 1
Answers by
Dimo
Telerik team
MICHAEL
Top achievements
Rank 1
Ryan
Top achievements
Rank 1
Share this question
or