.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Jean Paul
satyapriyanayak
SP
Ashutosh Jha
Simon Robert VoIP
Post New Web Links

MVC Partial View with Modal windows

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :ASP.Net
 

Here is what I have as best as I can explain it.


I have a partial view called experience that is basic html markup.

I have a page that contains rows of records (experience records) and one of the columns in these rows is an "edit" link column.  When I click that link I want to pass the id of that row to a method that will package up the details of that row (linq query to the experience table using the passed in id).

(this is the important part) ...... I want the partial view (experience.ascx) along with its new Model containing the experience details to load in a modal dialog box rather than another page.


How can I accomplish this?

I'm new to all this so this may be was too little info ... if so let me know and I can expand.  Thanks in advance





View Complete Post


More Related Resource Links

Check out issue - authentication modal dialog on every checkout, Explorer View or Open With Windows

  

Hi,

I got users that have an issue when trying to check out document, using the Explorer View or using Open With Windows Explorer.

Users are on Vista, IE 7 and Win 7, IE8

I have seen this Warning in the Application Event log:

"WMI ADAP was unable to retrieve data from the PerfLib subkey: SYSTEM\CurrentControlSet\Services\SSO\Performance\Library, error code: 0x80041009"

Any help would be very much appreciated!

 


partial view, 2 controllers

  

 Hi,

This is my first visit to the forums, I hope someone here can help me

 

I'm writing a small webapplication for creating repair tickets and adding comments, really basic

now I'm writing this in MVC2

So I have 2 controllers, 1 HomeController that does everything related to the tickets (listing tickets, creating new ones, editing) and 1 controller for the comments

the edit view for the homecontroller contains a partial view for /comment/create

so /home/edit/ticketnumber can edit the title and status of the ticket on the left side of the screen, the right side of the screen contains the partial view for adding comments

this is done like this:

Html.Renderaction("Create", "Comment");


but if I look at the generated html code when running the app, both save buttons go to /home/edit/ticketnumber

so the comment is never saved.

 

I hope this makes sense and that someone can help me solve this


Issue with opening SharePoint library in Windows Explorer view

  
I am having trouble opening a document library in Windows Explorer view. The portal is MOSS 2007. I have installed Office 2007 and IE7 on my computer. The error that I get is
"Documents in this folder are not available. The folder may have been moved or deleted, or network problems may be preventing a connection to the server."

Disappearing partial view

  

I have a view that uses a partital view.  The partial view is invisible when the page loads.  The user then clicks a button and I use Html.RenderPartial to make the view appear.


There is a button in the partial view in which the use will click which should make the partial view disappear.  How do I make the partial view disappear?

Thanks for the help!



20,000 foot view: Sql Server clustering vs. Windows OS Clustering

  
I read that Sql Server Failover requires Windows Sevrer clustering to be in place first. (The former builds on the latter). Why is this the case? In other words, what does "sql server clustering" bring to the mix  that normal Windows clustering doesn't supply? TIA, Barkingdog  

Rendering Partial view postback with data posted back and entire view context

  
This is the base Index.aspx view:<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <%@ Import Namespace="LMWebUI.Components" %> <%@ Import Namespace="LMWebUI.Models" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <% Session["HasScripts"] = "false"; %> <% if (Utility.FixNull(Session["LoggedIn"],"false") == "false" ) {%> <% ViewData["Login"] = new PartialRequest ( new { controller = "Account", action = "LogIn" } ); ((PartialRequest)ViewData["Login"]).Invoke(ViewContext); %> <%} else {%> <div>Logged In Content here</div> <%}%> <script type="text/javascript"> LMx.init(); </script> </asp:Content> This is a helper class> that I found elsewhere, doesn't solve the problem, but still works to display the viewpublic class PartialRequest { public RouteValueDictionary RouteValues { get; private set; } public PartialRequest(object routeValues

Sharepoint and IIS/Windows Event Logs in a single view

  
Hi - I'm coinsidering addng sharepoint log reading capabilities into an application I've built for reading windows and IIS logs (for more info http://logenvy.com). I know there are quite a few applications capable of reading sharepoint logs (a number are listed here http://stackoverflow.com/questions/781179/sharepoint-2007-log-viewer). Does anyone think the capability to analyse windows and IIS logs alongside sharepoint logs would be useful, or have any logging requirements not well met by the current set of tools? I'm especially keen to explore useful/interesting data visualizations on top of data logs.

Windows explorer view doesn't work on Windows 7

  
We are running Office SharePoint 2007 with SP2 on windows 2003 server. All windows 7 with IE 8 gets this message: " Please wait while Explorer View is loaded. If Explorer View does not appear, your browser may not support it". when click Windows Explorer in View. All Vista and XP work fine. I have tried these: 1. Added the SharePoint site on a Trusted Site. 2. Web Client is set to Automatically start, and that it is started. 3. We have Office 2003 installed on all computers. 4. We also tried to enable Comtability View. Is there a fix?Bob Lin, MS-MVP Networking, Internet, Routing, VPN Troubleshooting on http://www.ChicagoTech.net How to Setup Windows, Network, VPN & Remote Access on http://www.howtonetworking.com

Load View and Partial View (Master/Detail) with default parameter(s) ?

  
MVC newb.  Members view (index) that lists members that users can select to show a partial view in the same view with details for the selected member Uses jquery (Ajax.ActionLink) to call a partial view method in the members controller to then load the members detail section Works fine up to here....but I'd like to load the partial view with "member" details for a default or random member on initial load -- ie not through the Actionlink selection How do I invoke the partial view method on the initial load?  I'm sure this is basic stuff but still still getting my head around the mvc "way" Can someone point me to an example or explanation somewhere?  (not turning anything up on my searches thus far)   thanks in advance!!

View Source When Modal Popup Extender is Displayed

  
I've got some Javascript within a div that's displayed by a Modal Popup Extender. The Javascript is throwing an error. When I go to 'View Source', it appears that the source for the Modal Popup Extender and the Javascript contained therein isn't there. How can I view the source then? The Modal Popup Extender *is* being rendered.

Dynamic Javascript in Ajax Partial View

  
I have a partial view which uses Ajax.ActionLink to perform paging.  The AjaxOptions in the link identify the update target (a div on the main view) and some javascript to run OnSuccess (in the partial view).  The javascript must be in the partial view since there is some information in the partial view required to properly wire up the jQuery in the javascript.  This isn't working as expected.  The sample below is the minimum code to duplicate the behavior I am seeing: Controller: private static int count; // // GET: /Home/ public ActionResult Index() { ViewData["Test"] = count++; return View(); } [HttpPost] public ActionResult TestPartial() { ViewData["Test"] = count++; return PartialView(); } View:  <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Index</title> <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script> <script

Partial view and postbacks - undesired results

  
Sorry for the long post,I'm having problems after the postback. Each time I post back the changes made on the ui - I see the changes in the RateViewModel passed back, but the code populates each control in the table with these values - instead of the values from the ViewModel. What am I doing wrong?Object.public class CurrentAndFutureRate{        public int ParentID { get; set; }        public int ParentTypeID { get; set; }        public string ParentTypeDescription { get; set; }        public decimal CurrentRateValue { get; set; }        public DateTime CurrentStartDate { get; set; }        public DateTime? CurrentEndDate { get; set; }}View Modelspublic class CurrentAndFutureRateViewModel { public List<CurrentAndFutureRate> CurrentAndFutureRates { get; set; } } public class RateViewModel { public int ParentID { get; set; } public int ParentTypeID { get; set; } public int? RateID { get; set; } public decimal RateValue { get; set; } public DateTime StartDate { get; set; } public DateTime? EndDate { get; set; } } Master page renders a partial view(1) and the partial view displays a table

SharePoint 2007 - Windows 7 - Explorer View (Leaves a copy in recycle bin)

  
Hi All, I am facing a strange problem with SharePoint 2007 & Windows 7. I open an existing word document from my PC(Windows 7) and click "save as" and provide a SharePoint document library file path (\\machinename\sitename\DocumentLibraryName) and save the file. The word file becomes visible in the Shared document library, BUT it leaves a copy in the recycle bin of the SharePoint site. Works Normal from Windows XP PC. Any clues. Would greatly appreciate anybody's effort. Regards KCM

Ajax.BeginForm does not update/show the result in partial view

  

I have a view.On which i have two partial viewMy m ain is like this ->.(Note i am using Ajax.BeginForm here.)

<body >
<% using (Ajax.BeginForm("SearchRequests", new AjaxOptions { UpdateTargetId = "SearchRequestDIV" }))
   { %>
 <%-- <%using  (Html.BeginForm("SearchRequests", "PlanRequest", FormMethod.Post, new { enctype = "multipart/form-data" })){ %>--%>
    <div >
       <table class="tableborder" border="0" cellpadding="0" cellspacing="0">
            <%if (Model.MessageText !="" && Model.MessageText !="undefined") { %>
            <tr>
                <td >
                    <font color="red"><%=Html.Encode(Model.MessageText)%></font>
                </td>
            </tr>
            <%}%>
            <tr>
                <td>
                   <% Html.RenderPartial("SearchRequestCriteria", Model); %>         
                </td>
            </tr>
            
            <% if (Model.SearchResults.Count > 0)
               { %>
            <tr>
              <td>
                 <div id="SearchRequestDIV">
        
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend