Search Results

Search found 2654 results on 107 pages for 'partial'.

Page 5/107 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Partial rendering control using JQuery in MVC 2

    This article show a web custom control that allows partial rendering using JQuery in a MVC 2 web application...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Efficient, partial, point-in-time database restores

    - by GavinPayneUK
    This article is about a situation that many of us could describe the theoretical approach to solving, but then struggle to understand why SQL Server wasn’t following that theoretical approach when you tried it for real. Earlier this week, I had a client ask about the best way to perform: a partial database restore, 1 of 1300 filegroups; to a specific point in time; using a differential backup, and therefore; without restoring each transaction log backup taken since the full backup. The last point...(read more)

    Read the article

  • ASP.NET Web Form Model with Partial Rendering and Events

    This article explains the Event based ASP.NET Web Form programming model for a web application with reference to partial rendering and AJAX asynchronous postback....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Partial rendering control using JQuery

    This article show a web custom control that allows partial rendering using JQuery...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Should strongly typed partial views on one page in asp.net mvc-2 have one combined view model?

    - by Kai
    Hi guys, I have a question about asp.net mvc-2 strongly typed partial views, and view models. I was just wondering if I can (or should) have two strongly typed partial views on one page, without implementing a whole new view model for that page. For example, I have a page that displays profiles, but also has an inline form to add a quick contact. Each of these entities already has it's own view model, i.e I have a ProfileViewModel and a ContactViewModel. So my view needs two strongly typed partial views, one using an IEnumerable List of ProfileViewModels, and one using a ContactViewModel. Is it possible or desirable to avoid making a third view model, an 'IndexViewModel' for this page, which holds a list of ProfileViewModels and a ContactViewModel? Is not implementing this view model bad practice, or tidier as it results in less view models? Thanks!

    Read the article

  • Why doesn't functools.partial return a real function (and how to create one that does)?

    - by epsilon
    So I was playing around with currying functions in Python and one of the things that I noticed was that functools.partial returns a partial object rather than an actual function. One of the things that annoyed me about this was that if I did something along the lines of: five = partial(len, 'hello') five('something') then we get TypeError: len() takes exactly 1 argument (2 given) but what I want to happen is TypeError: five() takes no arguments (1 given) Is there a clean way to make it work like this? I wrote a workaround, but it's too hacky for my taste (doesn't work yet for functions with varargs): def mypartial(f, *args): argcount = f.func_code.co_argcount - len(args) params = ''.join('a' + str(i) + ',' for i in xrange(argcount)) code = ''' def func(f, args): def %s(%s): return f(*(args+(%s))) return %s ''' % (f.func_name, params, params, f.func_name) exec code in locals() return func(f, args)

    Read the article

  • how to do partial updates in OpenGL?

    - by Will
    It is general wisdom that you redraw the entire viewport on each frame. I would like to use partial updates; what are the various ways can do that, and what are their pros, cons and relative performance? (Using textures, FBOs, the accumulator buffer, any kind of scissors that can affect swapbuffers etc?) A scenario: a scene with a fair few thousand visible trees; although the textures are mipmapped and they are drawn via VBOs roughly front-to-back with so on, its still a lot of polys. Would streaming a single screen-sized texture be better than throwing them at the screen every frame? You'd have to redraw and recapture them only on camera movement or as often as your wind model updates or whatever, which need not be every frame.

    Read the article

  • Rails: Should partials be aware of instance variables?

    - by Alexandre
    Ryan Bates' nifty_scaffolding, for example, does this edit.html.erb <%= render :partial => 'form' %> new.html.erb <%= render :partial => 'form' %> _form.html.erb <%= form_for @some_object_defined_in_action %> That hidden state makes me feel uncomfortable, so I usually like to do this edit.html.erb <%= render :partial => 'form', :locals => { :object => @my_object } %> _form.html.erb <%= form_for object %> So which is better: a) having partials access instance variables or b) passing a partial all the variables it needs? I've been opting for b) as of late, but I did run into a little pickle: some_action.html.erb <% @dad.sons.each do |a_son| %> <%= render :partial => 'partial', :locals => { :son => a_son } %> <% end %> _partial.html.erb The son's name is <%= son.name %> The dad's name is <%= son.dad.name %> son.dad makes a database call to fetch the dad! So I would either have to access @dad, which would be going back to a) having partials access instance variables or I would have to pass @dad in locals, changing render :partial to <%= render :partial = 'partial', :locals = { :dad = @dad, :son = a_son } %, and for some reason passing a bunch of vars to my partial makes me feel uncomfortable. Maybe others feel this way as well. Hopefully that made some sense. Looking for some insight into this whole thing... Thanks!

    Read the article

  • Best placement for javascript in Asp.net MVC app that heavily uses partial views

    - by KallDrexx
    What is the best place for javascript that is specific to a partial view? For example, if I have a partial view (loaded via ajax call) with some divs and I want to turn those divs into an accordian, would it be better put the $("#section").accordion() in script tags inside of the partial view, or in a .js file in the function that retrieves that partial view and inserts it into the DOM? Obviously, common methods I will be keeping in a .js file, however I am more talking about javascript very specific to the partial view itself. Most things I find on the net seem to say to put all javascript into a separate .js but nothing addresses the idea of partial views.

    Read the article

  • LInq to SQL - Partial Class - C#

    - by Mark Comix
    Hi, I have a system with 2 different projects, one is called LINQ_Extensions and the other is ORM_Linq. On ORM_Linq i have the LINQ diagram with the SQL tables "converted" in clases. One of the Class is called "Tipos_Pago" In the other project i have another class (partial class) "Tipos_Pago". I want to use the method OnValidate to validate the properties include in the class "Tipos_Pago", so i create this partial class. In the 2 projects i put the same NameSpace "ORM_Linq"(I changed the NameSpace of the project "LINQ_Extensions" to have the same of the project "ORM_Linq") After those chages, Visual Studio give me this error: Error 1 No defining declaration found for implementing declaration of partial method 'ORM_Linq.Tipos_Pago.OnValidate(System.Data.Linq.ChangeAction)' C..\Tipos_Pago.cs 13 22 Extensiones_Linq I don't have any Idea of what happend, can someone help me? Thanks, sorry for my poor english This is the code in the partial class: namespace ORM_Linq { public partial class Tipos_Pago { partial void OnValidate(System.Data.Linq.ChangeAction action) { //Valid code } } }

    Read the article

  • Forms blank when rendering a partial when using a collection of objects. Help!

    - by dustmoo
    Alright, I know my title is a little obscure but it best describes the problem I am having. Essentially, I have a list of users, and want to be able to edit their information in-line using AJAX. Since the users are showing up in rows, I am using a partial to render the data and the forms (which will be hidden initially by the ajax), however, when the rows are rendered currently only the last item has it's form's fields populated. I suspect this has something to do with the fact that all the form fields have the same id's and it is confusing the DOM. But I don't know how to make sure the id's are unique. Here is a small example: In my view: <%= render :partial => 'shared/user', :collection => @users %> My partial (broke down to just the form) note that I am using the local variable "user" <% form_for user, :html => {:multipart => true} do |f| -%> <%= f.label :name, "Name*" %> <%= f.text_field :title, :class => "input" %> <%= f.label :Address, "Address" %> <%= f.text_field :address, :class => "input" %> <%= f.label :description, "Description*" %> <%= f.text_area :description, :class => "input" %> <% end -%> When the html is rendered each form has a unique id (for the id of the user) but the elements themselves all have the same id, and only the last user form is actually getting populated with values. Does anyone have any ideas?? :) Thanks in advance!

    Read the article

  • Ignore Partial Upgrade -- Google Earth Dependencies

    - by pyraz
    I'm running a 64-bit install of Xubuntu 12.04. It took me a little while to get Google Earth working. The 64-bit Google earth package requires some 32-bit gtk libraries provided by ia32-libs. However, when I ran a simulation to install ia32-libs and it's dependencies, it wanted to remove a ton of programs, including the xubuntu-desktop meta-package. As a work-around, I used getlibs to get the 32-bit libraries I needed, and then installed Google Earth with the deb package and the --ignore-depend option to dpkg. Awesome, Google Earth is installed and is working great! Now, however, Update Manager keeps complaining about a "Partial Upgrade", and apt-get won't let me install any new applications. It wants me to do a fix-broken install, but when I do a simulation of apt-get -f install I get some very bad news, they want to uninstall the Google Earth I just worked so hard to install! $> apt-get -f -s install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages will be REMOVED: googleearth 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. Remv googleearth [6.0.3.2197+0.7.0-1] TL;DR The --ignore-depends passed to dpkg is not propagating to apt-get, so now I can't install any new applications until I uninstall Google Earth, because of it's missing dependencies (even though it works fine without them). How can I fix this?

    Read the article

  • Using data input from pop-up page to current with partial refresh

    - by dpDesignz
    I'm building a product editor webpage using visual C#. I've got an image uploader popping up using fancybox, and I need to get the info from my fancybox once submitted to go back to the first page without clearing any info. I know I need to use ajax but how would I do it? <%@ Page Language="C#" AutoEventWireup="true" CodeFile="uploader.aspx.cs" Inherits="uploader" %> <!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 id="Head1" runat="server"> <title></title> </head> <body style="width:350px; height:70px;"> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div> <div style="width:312px; height:20px; background-color:Gray; color:White; padding-left:8px; margin-bottom:4px; text-transform:uppercase; font-weight:bold;">Uploader</div> <asp:FileUpload id="fileUp" runat="server" /> <asp:Button runat="server" id="UploadButton" text="Upload" onclick="UploadButton_Click" /> <br /><asp:Label ID="txtFile" runat="server"></asp:Label> <div style="width:312px; height:15px; background-color:#CCCCCC; color:#4d4d4d; padding-right:8px; margin-top:4px; text-align:right; font-size:x-small;">Click upload to insert your image into your product</div> </div> </form> </body> </html> CS so far using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Configuration; // Add to page using System.Web.UI; using System.Web.UI.WebControls; using System.Data; // Add to the page using System.Data.SqlClient; // Add to the page using System.Text; // Add to Page public partial class uploader : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void UploadButton_Click(object sender, EventArgs e) { if (fileUp.HasFile) try { fileUp.SaveAs("\\\\london\\users\\DP006\\Websites\\images\\" + fileUp.FileName); string imagePath = fileUp.PostedFile.FileName; } catch (Exception ex) { txtFile.Text = "ERROR: " + ex.Message.ToString(); } finally { } else { txtFile.Text = "You have not specified a file."; } } }

    Read the article

  • How can I use partial views in ASP.NET?

    - by kavitha desai
    I have done partial views in ASP.NET MVC but now I want to convert it to ASP.NET. I have used AJAX and JavaScript. How can I convert the following: <a href="#" onclick="LoadPartialView('#MainContentDiv', '<%=Url.Action("AdminHome", "Admin")%>')">Home</a> , <input type="button" value="Submit" onclick="LoadPartialViewPost('#MainContentDiv', '<%=Url.Action("ViewPage", "Controller")%>', $('form').serialize())" /> to ASP.NET, or in other words, how can I load a partial view in ASP.NET?

    Read the article

  • Ruby on Rails: What are partial hash arguments and full set arguments?

    - by williamjones
    I'm using asserts_redirected_to in my unit tests, and I'm receiving this warning: DEPRECATION WARNING: Using assert_redirected_to with partial hash arguments is deprecated. Specify the full set arguments instead. What is a partial hash argument, and what is a full set argument? These aren't terms that I've seen used in the Rails community before, and the only relevant results I can find on Google for these are in reference to this deprecation warning. Here is my code: assert_redirected_to :controller => :user, :action => :search also tried: assert_redirected_to({:controller => :user, :action => :search}) I might have guessed that it feels I'm missing some parameters or something like that, but the API documentation explicitly says that not all parameters need to be included: http://rails.rubyonrails.org/classes/ActionController/Assertions/ResponseAssertions.html

    Read the article

  • Local variable not being passed to partial template by render?

    - by brad
    I don't seem to be able to pass a variable to my partial template in rails (2.3.5). My code is as follows; In the main view .html.erb file: <% f.fields_for :payments do |payment_form| %> <%= render 'payment', {:f => payment_form, :t => "test" } %> <% end %> and in the _payment.html.erb file: <%= t %> produces a wrong number of arguments (0 for 1) error. The payment_form object is being passed to the partial as f without any problems. I've tried a number of variations on the above syntax (e.g. :locals => {:f => payment_form, :t => "test" } without success. I presume I'm doing something pretty basic wrong but just can't see it.

    Read the article

  • Partial Page Rendering in OAF Page

    - by PRajkumar
    Let us try to implement partial page rendering for a text item. If value of TextItem1 is null then TextItem2 will not be appreared on UI. If value of TextItem1 is not null then TextItem2 will be appreared on UI.   1. Create a New OA Workspace and Empty OA Project File> New > General> Workspace Configured for Oracle Applications File Name -- PPRProj Project Name – PPRDemoProj Default Package -- prajkumar.oracle.apps.fnd.pprdemo   2. Create Application Module AM PPRDemoProj right click > New > ADF Business Components > Application Module Name -- PPRAM Package -- prajkumar.oracle.apps.fnd.pprdemo.server   Check Application Module Class: PPRAMImpl Generate JavaFile(s)   3. Create a PPRVO View Object PPRDemoProj> New > ADF Business Components > View Objects Name – PPRVO Package – prajkumar.oracle.apps.fnd.pprdemo.server   In Attribute Page Click on New button and create transient primary key attribute with the following properties:   Attribute Property Name RowKey Type Number Updateable Always Key Attribute (Checked)   Click New button again and create transient attribute with the following properties:   Attribute Property Name TextItem2Render Type Boolean Updateable Always   Note – No Need to generate any JAVA files for PPRVO   4. Add Your View Object to Root UI Application Module Right click on PPRAM > Edit PPRAM > Data Model > Select PPRVO in Available View Objects list and shuttle to Data Model list   5. Create a OA components Page PPRDemoProj right click > New > OA Components > Page Name – PPRPG Package -- prajkumar.oracle.apps.fnd.pprdemo.webui   6. Modify the Page Layout (Top-level) Region   Attribute Property ID PageLayoutRN Region Style pageLayout Form Property True Auto Footer True Window Title PPR Demo Window Title True Title PPR Demo Page Header AM Definition prajkumar.oracle.apps.fnd.pprdemo.server.PPRAM   7. Create the Second Region (Main Content Region) Right click on PageLayoutRN > New > Region   Attribute Property ID MainRN Region Style messageComponentLayout   8. Create Two Text Items   Create First messageTextItem -- Right click on MainRN > New > messageTextInput   Attribute Property ID TextItem1 Region Style messageTextInput Prompt Text Item1 Length 20 Disable Server Side Validation True Disable Client Side Validation True Action Type firePartialAction Event TextItem1Change Submit True   Note -- Disable Client Side Validation and Event property appears after you set the Action Type property to firePartialAction   Create Second messageTextItem -- Select MainRN right click > New > messageTextInput   Attribute Property ID TextItem2 Region Style messageTextInput Prompt Text Item2 Length 20 Rendered ${oa.PPRVO1.TextItem2Render}   9. Add Following code in PPRAMImpl.java   import oracle.apps.fnd.framework.OARow; import oracle.apps.fnd.framework.OAViewObject; import oracle.apps.fnd.framework.server.OAApplicationModuleImpl; import oracle.apps.fnd.framework.server.OAViewObjectImpl; public void handlePPRAction()  {   Number val = 1;  OAViewObject vo = (OAViewObject)findViewObject("PPRVO1");  if (vo != null)   {    if (vo.getFetchedRowCount() == 0)    {     vo.setMaxFetchSize(0);     vo.executeQuery();     vo.insertRow(vo.createRow());     OARow row = (OARow)vo.first();            row.setAttribute("RowKey", val);    row.setAttribute("TextItem2Render", Boolean.FALSE);      }  } }   10. Implement Controller for Page Select PageLayoutRN in Structure pane right click > Set New Controller Package Name -- prajkumar.oracle.apps.fnd.pprdemo.webui Class Name – PPRCO   Write following code in processFormRequest function of PPRCO Controller   import oracle.apps.fnd.framework.OARow; import oracle.apps.fnd.framework.OAViewObject; public void processRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processRequest(pageContext, webBean);  PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean);      am.invokeMethod("handlePPRAction"); } public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processFormRequest(pageContext, webBean);        PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean);  OAViewObject vo = (OAViewObject)am.findViewObject("PPRVO1");  OARow row = (OARow)vo.getCurrentRow();        if ("TextItem1Change".equals(pageContext.getParameter(EVENT_PARAM)))  {   if (pageContext.getParameter("TextItem1").equals(""))   {    row.setAttribute("TextItem2Render", Boolean.FALSE);   }   else   {    row.setAttribute("TextItem2Render", Boolean.TRUE);   }  } }   11. Congratulation you have successfully finished. Run Your PPRPG page and Test Your Work          

    Read the article

  • Render partial view with updated value.

    - by janiya
    I am working on asp.net mvc project using views and partial views. Multiple partial views are being rendered in single view. Now my problem is that when ever i update some values in partial view and render it again through controller it does not show partial view with updated value.... to see updated value i have to refresh the page each time.

    Read the article

  • One More Solar Eclipse Hitting The Earth

    - by Suganya
    After the partial Solar eclipse that occurred on 01 July 2011, there is one another partial solar eclipse hitting the earth on 25 November 2011. This is the fourth and the final solar eclipse that is going to happen during this year. This eclipse is highly visible from the southern hemisphere, which means it can be witnessed from Southern South Africa, Antarctica , Tasmania and Many regions of New Zealand. The eclipse touches a greatest magnitude of 0.905 at 06:20:17 am Universal Time. This eclipse is the 53rd eclipse and belongs to Saros123 series. The details about the time and place from where this eclipse can be addressed are given below. All time mentioned here are local time of that location. S.No Place Eclipse Start Time Eclipse End Time Maximum Eclipse 1 Cape Town, South Africa 6:28:07 7:18:08 6:52:42 2 Port Elizabeth, SOUTH AFRICA 6:38:16 7:07:49 6:52:56 3 Christchurch, NEW ZEALAND 19:07:01 19:42 19:42 4 Wellington, NEW ZEALAND 19:10:22 19:26 19:26 5 Dunedin, NEW ZEALAND 19:03:13 19:58 19:40:40 This is the largest partial eclipse that is going to hit the earth this year and while at the maximum eclipse time, the lunar shadow will pass 330 kilometers above the earth’s surface near the coast of Antarctica. Source : NASA CC Image Credit : Joerg Weingrill This article titled,One More Solar Eclipse Hitting The Earth, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • In ASP.NET MVC, How do I make a partial view available to all controllers?

    - by Quakkels
    In ASP.NET MVC, How do I make a partial view available to all controllers? I want to create navigation that is common across the entire site, but when I place the Html.Action into my master page, it only works on views associated with 1 controller. Right now, I have a controller action defined like this: // GET: GetCategoriesPartial [ChildActionOnly] public ActionResult GetCategoriesPartial() { var category = CategoriesDataContext.GetCategories(); return PartialView(category); } And I've created my partial view like this: <%@ Import Namespace="wopr.Models" %> <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <ul> <% foreach (var cat in Model as IEnumerable<Category>) { %> <li><a href="/categories/Details/<%=cat.catID%>"><%=cat.catName%></a></li> <% } %> </ul> My Master Page looks like this: <%@ Import Namespace="wopr.Models" %> <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> <!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><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title> <link type="text/css" rel="Stylesheet" href="/Content/Site.css" /> </head> <body> <div class="wrap-all"> <div style="text-align:right;"> <a href="/">Home</a> | <a href="/games/">Games</a> | <a href="/games/Index2/1">Games <em>(paginated)</em></a> | <a href="/categories/">Categories</a> | <a href="/upload/">Upload</a> </div> <asp:ContentPlaceHolder ID="MainContent" runat="server"> </asp:ContentPlaceHolder> <!--This errors on any non-CategoryController page.--> <%= Html.Action("GetCategoriesPartial")%> <!----> </div> </body> </html> This code works as long as I'm viewing something handled by the CategoriesController. If I go to any view handled by a different controller, I get the exception: System.Web.HttpException: A public action method 'GetCategoriesPartial' was not found on controller 'wopr.Controllers.GamesController'. How do I make this partial view available to all the site's controllers? Thanks for any help. Quakkels

    Read the article

  • ASP MVC html helpers in partial views

    - by Rabbi
    I am still trying to figure out how to create reusable partial views in MVC Lets say I would like to create a partial view to display a form for submitting an address. Then in my ViewModel I have two addresses (Home address & Work Address) So I would think that in my view I call HTML.Partial for each one like this @Html.Partial("Address", Model.HomeAddress) @Html.Partial("Address", Model.WorkAddress) but what happens is instead of the fields having names like HomeAddress.Street, HomeAddress.City etc. they just have the regular field names Street, City, etc. so the binder on the HTTPPost action has no idea what to do with them Thanks in advance

    Read the article

  • how create a Controller partial class to override OnAuthorization?

    - by kaijk
    I'm trying to change the method OnAuthorization, so that it is available for any application ... this way: public partial class Controller { protected override void OnAuthorization(AuthorizationContext filterContext) { if ((string)(filterContext.RouteData.Values["action"]) == "test") { filterContext.Result = new HttpUnauthorizedResult(); } } } but is showing the compilation error: ...Controller.OnAuthorization(System.Web.Mvc.AuthorizationContext)': no suitable method found to override can someone help me?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >