Search Results

Search found 53991 results on 2160 pages for 'asp net 3 5'.

Page 100/2160 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Synchronizing ASP.NET MVC action methods with ReaderWriterLockSlim

    - by James D
    Any obvious issues/problems/gotchas with synchronizing access (in an ASP.NET MVC blogging engine) to a shared object model (NHibernate, but it could be anything) at the Controller/Action level via ReaderWriterLockSlim? (Assume the object model is very large and expensive to build per-request, so we need to share it among requests.) Here's how a typical "Read Post" action would look. Enter the read lock, do some work, exit the read lock. public ActionResult ReadPost(int id) { // ReaderWriterLockSlim allows multiple concurrent writes; this method // only blocks in the unlikely event that some other client is currently // writing to the model, which would only happen if a comment were being // submitted or a new post were being saved. _lock.EnterReadLock(); try { // Access the model, fetch the post with specificied id // Pseudocode, etc. Post p = TheObjectModel.GetPostByID(id); ActionResult ar = View(p); return ar; } finally { // Under all code paths, we must release the read lock _lock.ExitReadLock(); } } Meanwhile, if a user submits a comment or an author authors a new post, they're going to need write access to the model, which is done roughly like so: [AcceptVerbs(HttpVerbs.Post)] public ActionResult SaveComment(/* some posted data */) { // try/finally omitted for brevity _lock.EnterWriteLock(); // Save the comment to the DB, update the model to include the comment, etc. _lock.ExitWriteLock(); } Of course, this could also be done by tagging those action methods with some sort of "synchronized" attribute... but however you do it, my question is is this a bad idea? ps. ReaderWriterLockSlim is optimized for multiple concurrent reads, and only blocks if the write lock is held. Since writes are so infrequent (1000s or 10,000s or 100,000s of reads for every 1 write), and since they're of such a short duration, the effect is that the model is synchronized , and almost nobody ever locks, and if they do, it's not for very long.

    Read the article

  • How to assign .net membership roles to individual database records

    - by mdresser
    I'm developing a system where we want to restrict the availability of information displayed to users based on their roles. e.g. I have a tabled called EventType (ID, EventTypeDescription) which contains the following records: 1, 'Basic Event' 2, 'Intermediate Event' 3, 'Admin Event' What I need to achieve is to filter the records returned based on the username (and hence role) of the logged-in user. e.g if an advanced user is logged in they will see all the event types, if the standard user is logged in they will only see the basic event type etc. Ideally id like to do this in a way which can be easily extended to other tables as necessary. So I'd like to avoid simply adding a 'Roles' field to each table where the data is user context sensitive. One idea I'm thinking of is to create some kind of permissions table like: PermissionsTable ( ID, Aspnet_RoleId, TableName, PrimaryKeyValue ) this has the drawback of using this is obviously having to use the table name to switch which table to join onto. Edit: In the absence of any better suggestions, I'm going to go with the last idea I mentioned, but instead of having a TableName field, I'm going to normalise the TableName out to it's own table as follows: TableNames ( ID, TableName ) UserPermissionsTable ( ID, Aspnet_UserId, TableID, PrimaryKeyValue )

    Read the article

  • Subscription payment processing with ASP.NET

    - by bobsmith123
    I would like to create a subscription based website with users getting charged every month. I know I have to create an account with paypal or authorize.net. Do these payment providers automatically bill the user every month? How would I take care of offering the service free for 30 days and start billing after that? Also, I've heard of middle men services like spreedly, chargify. Where do they fit into the equation? Can someone help me wrap my head around these concepts? Considering, I am based in the U.S but would like to have the payment provider accept any kind of currency. Which payment provider do you suggest?

    Read the article

  • Where should i place the scriptmanager

    - by SmartestVEGA
    I am planning to rebuilding the code of one asp.net project to another asp.net project. but i am stuck some where ... I drag and dropped the master page and the views (4 nos) into the master page. now i need to drop scriptmanager.. where should i need to drag and drop this? inside the multiview outside the multiview inside view? if show which view ? view 1 ? view 2? view 3? view 4? What actually the script manager do ?

    Read the article

  • QT vs. Net - REAL comparisons for R.A.D. projects

    - by Pirate for Profit
    Man in all these Qt vs. .NET discussions 90% these people argue about the dumbest crap. Trying to get a real comparison chart here, because I know a little about both frameworks but I don't know everything. I believe Qt and .NET both have strengths and weaknesses. This is to make a comparison that highlights these so people can make more informed decisions before embarking on a project, in the spirit of R.A.D. Event Handling In Qt the event handling system is very simple. You just emit signals when something cool happens and then catch them in slots. ie. // run some calculations, then emit valueChanged(30, false, 20.2); and then catching it, any object can make a slot to recieve that message easily void MyObj::valueChanged(int percent, bool ok, float timeRemaining). It's easy to "block" an event or "disconnect" when needed, and works seamlessly across threads... once you get the hang of it, it just seems a lot more natural and intuitive than the way the .NET event handling is set up (you know, void valueChanged(object sender, CustomEventArgs e). And I'm not just talking about syntax, because in the end the .NET anonymous delegates are the bomb. I'm also talking about in more than just reflection (because, yes, .NET obviously has much stronger reflection capabilities). I'm talking about in the way the system feels to a human being. Qt wins hands down for the simplest yet still flexible event handling system ever i m o. Plugins and such I do love some of the ease of C# compared to C++, as well as .NET's assembly architecture, even though it leads to a bunch of .dll's (there's ways to combine everything into a single exe though). That is a big bonus for modular projects, which are a PITA to import stuff in C++ as far as RAD is concerned. Database Ease of Doing Crap Also what about datasets and database manipulations. I think .net wins here but I'm not sure. Threading/Conccurency How do you guys think of the threading? In .NET, all I've ever done is make like a list of master worker threads with locks. I like QConcurrentFramework, you don't worry about locks or anything, and with the ease of the signal slot system across threads it's nice to get notified about the progress of things. QConcurrent is the simplest threading mechanism I've ever played with. Memory Usage Also what do you think of the overall memory usage comparison. Is the .NET garbage collector pretty on the ball and quick compared to the instantaneous nature of native memory management? Or does it just let programs leak up a storm and lag the computer then clean it up when it's about to really lag? Doesn't the just-in-time compiler make native code that is pretty good, like and that only happens the first time the program is run? However, I am a n00b who doesn't know what I'm talking about, please school me on the subject.

    Read the article

  • Managing multiple .NET languages in a web application

    - by tomfanning
    I am part of a development team building a new ASP.NET 3.5 web application. Two of us are C# coders, and the other is a VB.NET coder. I know that we can mix languages on a per-project basis, and one can build classes in one language that inherit from classes written in the other language in a different project (which we are already doing), but I can see us getting into a situation where we might well end up with cyclic dependencies between our various project DLLs. Other than simply having a high number of projects (more seperation of concerns into more libraries), how have you managed this situation on your own projects? Note - I believe this question to be different enough from the only similar match I could find (this one) on the basis that we are not wanting to use different languages in order to take advantage of their specific features per se, but rather to make use of what developer resource is available to us (i.e. one dev just happens to be VB.NET only).

    Read the article

  • How to properly develop and deploy features for existing asp.net applications on IIS

    - by Tomh
    My question actually consists of multiple questions. I'm frequently reading about companies who deploy a small subset of features for a select amount of customers using the live "database". Ruby on Rails and its ecosystem have deployment tools and database migrations to deploy or rollback such features in a live production or staging environment. My question, how is this done for an asp.net (mvc in particular) application? How do you test your newly released features against live data? Do you have any tools to modify the existing database and roll back changes if necessary? Do you make backups before deployment? Update Maybe I should point out that my question is not really clear, getting more answers here will help me phrase the question better. To make it easier I will describe a situation I'm commonly seeing with some of my clients. My clients have large deployments of popular web applications. They do not have staging/QA/testing servers. (yes this is not optimal). The data their apps consist of are images, xml files, user uploads and data in Sql Server. Having a few records, of their production database and a couple of dummy files is not a substitute of testing against real data in my opinion. How would you design a workflow that can create a acceptable environment to mimic a production environment before going live?

    Read the article

  • web.config + asp.net MVC + location > system.web > authorization + Integrated Security

    - by vdh_ant
    Hi guys I have an ASP.Net MVC app using Integrated Security that I need to be able grant open access to a specific route. The route in question is '~/Agreements/Upload' and the config I have setup looks like this: <configuration> ... <location path="~/Agreements/Upload"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> ... </configuration> I have tried a few things and nothing has worked thus far. In IIS under Directory Security Authentication Methods I only have "Integrated Windows Authentication" selected. Now this could be part of my problem (as even though IIS allows the above IIS doesn't). But if that's the case how do I configure it so that Integrated Security works but allows people who aren't authenticated to access the given route. Cheers Anthony

    Read the article

  • LINQ how to concatenate 2 db columns to display in dropdownlist

    - by Simke Nys
    I'm trying to concatenate product_name with product_prize_kg by using LINQ so I can display it as one field in a dropdownlist. When I try to do this I get the following error. value of type 'system.collections.generic.list(of anonymous type )' cannot be converted to ... My code is like this: Public Function selectAll() As List(Of tblProduct) Dim result = From product In dc.tblProducts Select New With { Key .productID = product.pk_product_id, Key .productNameKg = Convert.ToString(product.product_name) & " " & Convert.ToString(product.product_price_kg) } Return result.ToList() End Function This is the dropdownlist that I want to fill. <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ObjectDataSource1" DataTextField="productNameKg" DataValueField="productID"> </asp:DropDownList> Thanks Grtz Simke

    Read the article

  • HtmlAgilityPack - Vs 2010 - c# ASP - File Not found

    - by Janosch Geigowskoskilu
    First, I've already searched the web & StackOverflow for hours, and i did find a lot about troubleshooting HtmlAgilityPack and tried most of these but nothing worked. The Situation: I'm developing a C# ASP .NET WebPart in SharePoint Foundation. Everything works fine, now I want to Parse a HTML Page to get all ImagePaths and save the Images on HD/Temp. To do that I was downloading HtmlAgilityPack, current version, add reference to Project, everything looks OK, IntelliSense works fine. The Exception: But when I want to run the section where HtmlAgilityPack should be used my Browser shows me a FileNotFoundException - The File or Assembly could not be found. What I tried: After first searches i tried to include v1.4.0 of HtmlAgilityPack cause I read that the current version in some case is not really stable. This works fine to until the point I want to use HtmlAgilityPack, the same Exception. I also tried moving the HtmlAgilityPack direct to the Solution directory, nothing changed. I tried to insert HtmlAgilityPack via using and I tried direct call e.g. HtmlAgilityPack.HtmlDocument. Conclusion : When I compile no error occurs, the reference is set correct. When I trace the HtmlAgilityPack.dll with ProcMon the Path is shown correct, but sometimes the Result is 'File Locked with only Readers' but I don't know enough about ProcMon to Know what this means or if this is critical. It couldn't have something to do with File Permissions because if I check the DLL the permissions are all given.

    Read the article

  • Running BlogEngine.NET with ASP.NET MVC under same website?

    - by Raj Aththanayake
    Hi Can anyone please help me with this? I have a Windows 2008 server and MVC 2.0 site is hosted under IIS 7.0 root directory. The site works fine. I want to use the BlogEngine.NET with my site. For example if my mite name is http:// mysite.com (which is the root of IIS) and the blog should be http://mysite.com/blog/Default.aspx Is this possible? Can I create a sub virtual directory within my root (where the MVC 2 app is hosted) and run the ASP.NET BlogEngine.Net in it? Any ideas appreciated.

    Read the article

  • Windows/.NET Load Distribution & Balancing

    - by andrewbadera
    Hi all, Is there a vetted Windows-friendly, or even .NET-native, load-distributing/load-balancing utility out there along the lines of HA Proxy? We have a .NET stack product, and the one piece that we step out of the stack is for load-balancing. We need something with configurable rules for distribution -- perhaps subdomain-driven -- that NLB alone doesn't seem to offer. If it integrates directly with .NET, or offers an exposed API callable by webservices, so much the better! Thanks in advance! Clarification: we need to logically part over boxes. This is not just a cluster/failover/replication scenario.

    Read the article

  • Using A Local file path in a Streamwriter object ASP.Net

    - by Nick LaMarca
    I am trying to create a csv file of some data. I have wrote a function that successfully does this.... Private Sub CreateCSVFile(ByVal dt As DataTable, ByVal strFilePath As String) Dim sw As New StreamWriter(strFilePath, False) ''# First we will write the headers. ''EDataTable dt = m_dsProducts.Tables[0]; Dim iColCount As Integer = dt.Columns.Count For i As Integer = 0 To iColCount - 1 sw.Write(dt.Columns(i)) If i < iColCount - 1 Then sw.Write(",") End If Next sw.Write(sw.NewLine) ''# Now write all the rows. For Each dr As DataRow In dt.Rows For i As Integer = 0 To iColCount - 1 If Not Convert.IsDBNull(dr(i)) Then sw.Write(dr(i).ToString()) End If If i < iColCount - 1 Then sw.Write(",") End If Next sw.Write(sw.NewLine) Next sw.Close() End Sub The problem is I am not using the streamwriter object correctly for what I trying to accomplish. Since this is an asp.net I need the user to pick a local filepath to put the file on. If I pass any path to this function its gonna try to write it to the directory specified on the server where the code is. I would like this to popup and let the user select a place on their local machine to put the file.... Dim exData As Byte() = File.ReadAllBytes(Server.MapPath(eio)) File.Delete(Server.MapPath(eio)) Response.AddHeader("content-disposition", String.Format("attachment; filename={0}", fn)) Response.ContentType = "application/x-msexcel" Response.BinaryWrite(exData) Response.Flush() Response.End() I am calling the first function in code like this... Dim emplTable As DataTable = SiteAccess.DownloadEmployee_H() CreateCSVFile(emplTable, "C:\\EmplTable.csv") Where I dont want to have specify the file loaction (because this will put the file on the server and not on a client machine) but rather let the user select the location on their client machine. Can someone help me put this together? Thanks in advance.

    Read the article

  • How to use Profile in asp.net?

    - by Phsika
    i try to learn asp.net Profile management. But i added below xml firstName,LastName and others. But i cannot write Profile. if i try to write Profile property. drow my editor Profile : Error 1 The name 'Profile' does not exist in the current context C:\Documents and Settings\ykaratoprak\Desktop\Security\WebApp_profile\WebApp_profile\Default.aspx.cs 18 13 WebApp_profile How can i do that? <authentication mode="Windows"/> <profile> <properties> <add name="FirstName"/> <add name="LastName"/> <add name="Age"/> <add name="City"/> </properties> </profile> protected void Button1_Click(object sender, System.EventArgs e) { Profile.FirstName = TextBox1.Text; Profile.LastName = TextBox2.Text; Profile.Age = TextBox3.Text; Profile.City = TextBox4.Text; Label1.Text = "Profile stored successfully!<br />" + "<br />First Name: " + Profile.FirstName + "<br />Last Name: " + Profile.LastName + "<br />Age: " + Profile.Age + "<br />City: " + Profile.City; }

    Read the article

  • .net MVC 3 multiple columns

    - by Teodor
    i want to display a list in more columns with 5 items/column my code now doesn't work as expected: @{ var c=0; } <div > @foreach (var item in Model) { c += 1; @Html.ActionLink(item.Judet , "Browse", new { judet = item.Judet }) <br /> if (c == 5){ Response.Write("</div><div style='border: 1px solid red;'>"); c = 0; } } </div>

    Read the article

  • AsyncPostBackTrigger Just flashing/flicking the UpdatePanel but not updating it

    - by Pankaj
    I am trying UpdatePanel & AsyncPostBackTrigger on master pages through find control method but problem is when I click on button (UpdateButton) It just flash/flick (No Postback) the UpdatePanle but still it don't update or refresh the gridview (images) inside the updatePanel. I have placed script Manger on the master page & an AJAX Update panel in a ContentPlaceHolder in the child page. Also, in another ContentPlaceholder there is an asp button (outside of the UpdatePanel). I want to refresh/reload the AJAX UpdatePanel with this asp button. Thanks for suggestions. Child Page Code :- protected void Page_Load(object sender, EventArgs e) { ScriptManager ScriptManager1 = (ScriptManager)Master.FindControl("ScriptManager1"); ContentPlaceHolder cph = (ContentPlaceHolder)Master.FindControl("cp_Button"); Button btnRefresh = (Button)cph.FindControl("btnRefresh"); ScriptManager1.RegisterAsyncPostBackControl(btnRefresh); } protected void btnRefresh_Click(object sender, EventArgs e) { UpdatePanel1.Update(); } <%@ Page Title="" Language="C#" MasterPageFile="~/InnerMaster.master" AutoEventWireup="true" CodeFile="A.aspx.cs" Inherits="A" Async="true" %> <asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server"> <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:Image ID="img12" runat="server" Width="650px" Height="600" ToolTip="A" ImageUrl='<%# Page.ResolveUrl(string.Format("~/Cli/{0}", Eval("image"))) %>' /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </ContentTemplate> </asp:UpdatePanel> </asp:Content> <asp:Content ID="Content4" ContentPlaceHolderID="cp_Button" Runat="Server"> <asp:Button ID ="btnRefresh" runat="server" onclick="btnRefresh_Click" Height="34" Width="110" Text="More Images" /> </asp:Content> Hi updated code :- Now on click event whole pages is refreshed. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; namespace EProxy { public class EventProxy : Control, IPostBackEventHandler { public EventProxy() { } public void RaisePostBackEvent(string eventArgument) { } public event EventHandler<EventArgs> EventProxied; protected virtual void OnEventProxy(EventArgs e) { if (this.EventProxied != null) { this.EventProxied(this, e); } } public void ProxyEvent(EventArgs e) { OnEventProxy(e); } } } On Master Page Code (btn click):- protected void btnRefresh_Click(object sender, EventArgs e) { ContentPlaceHolder cph = (ContentPlaceHolder)this.FindControl("MainContent"); EventProxy eventProxy = (EventProxy)cph.FindControl("ProxyControl") as EventProxy; eventProxy.ProxyEvent(e); } Web Config :- <pages maintainScrollPositionOnPostBack="true" enableViewStateMac="true"> <controls> <add tagPrefix="it" namespace="EProxy" assembly="App_Code"/> </controls> </pages>

    Read the article

  • Membership.ValidateUser always returns false after upgrade to VS 2010 / .NET 4.0

    - by nw
    Not sure whether this pertains to VS 2010 or to the upgraded framework, but... we are using the Oracle membership provider to authenticate users. Prior to the upgrade everything worked fine, but now Membership.ValidateUser(user, password) returns false despite valid credentials. There is no exception thrown, so it's hard to determine what the problem might be. The website administration tool in VS 2010 is still able to manage users and roles (more or less), so I have no reason to question connectivity. What might the problem be?

    Read the article

  • Unit testing MVC.net Redirection

    - by Dan
    How do I Unit Test a MVC redirection? public ActionResult Create(Product product) { _productTask.Save(product); return RedirectToAction("Success"); } public ActionResult Success() { return View(); } Is Ayende's approach still the best way to go, with preview 5: public static void RenderView(this Controller self, string action) { typeof(Controller).GetMethod("RenderView").Invoke(self,new object[] { action} ); } Seems odd to have to do this, especially as the MVC team have said they are writing the framework to be testable.

    Read the article

  • Retaining parameters in ASP.NET MVC

    - by MapDot
    Many MVC frameworks (e.g. PHP's Zend Framework) have a way of providing basic state management through URLs. The basic principle is this: Any parameters that were not explicitly modified or un-set get copied into every URL For instance, consider a listing with pagination. You'll have the order, direction and page number passed as URL parameters. You may also have a couple of filters. Changing the value of a filter should not alter the sort order. ASP.net MVC seems to remember your controller and action by default: <%: Html.RouteLink("Next", "MyRoute", new {id = next.ItemId}) %> This will not re-set your action or controller. However, it does seem to forget all other parameters. The same is true of ActionLink. Parameters that get set earlier on in your URL seem to get retained as well. Is there a way to make it retain more than that? For instance, this does not seem to affect any of the links being generated: RouteValues.RouteData.Values["showDeleted"] = true;

    Read the article

  • Use of RegularExpressionValidator in MS .Net Framework

    - by Lawk Salih
    Hi- I am trying to use the RegularExpressionValidator Control in Visual Studio to validate a textbox for email address expressions. Here's my code (very basic) Email:&nbsp; <input id="Text1" type="text" /><br /> <br /> <input id="Validate" type="button" value="Validate" runat="server" /><br /> <br /> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="RegularExpressionValidator" ControlToValidate="Validate" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator> Now, when I set controlToValidate to Validate, I get the following error message: Server Error in '/' Application. Control 'Validate' referenced by the ControlToValidate property of 'RegularExpressionValidator1' cannot be validated. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Control 'Validate' referenced by the ControlToValidate property of 'RegularExpressionValidator1' cannot be validated. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [HttpException (0x80004005): Control 'Validate' referenced by the ControlToValidate property of 'RegularExpressionValidator1' cannot be validated.] System.Web.UI.WebControls.BaseValidator.CheckControlValidationProperty(String name, String propertyName) +8734357 System.Web.UI.WebControls.BaseValidator.ControlPropertiesValid() +40 System.Web.UI.WebControls.BaseValidator.get_PropertiesValid() +21 System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +27 System.Web.UI.Control.PreRenderRecursiveInternal() +80 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842 Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3082 I have tried the same mechanism before and have worked; however, this time I am on a new machine, WinXP Pro running IIS v5.1. Any direction would be appreciated.

    Read the article

  • ASP.NET server data persistence

    - by Wayne Werner
    Hi, I'm not really sure exactly how the question should be phrased, so please be patient if I ask the wrong thing. I'm writing an ASP.NET application using VB as the code behind language. I have a data access class that connects to the DB to run the query (parameterized, of course), and another class to perform the validation tasks - I access this class from my aspx page. What I would like is to be able to store the data server side and wait for the user to choose from a few options based on the validity of the data. But unless my understanding is completely off, having persistent data objects on the server will give problems when multiple users connect? My ultimate goal is that once the data has been validated the end user can't modify it. Currently I'm validating the data, but I still have to retrieve it from the web form AFTER the user says OK, which obviously leaves open the possibility of injecting bad data either accidentally (unlikely) or on purpose (also unlikely for the use, but I'd prefer not to take the chance). So am I completely off in my understanding? If so, can someone point me to a resource that provides some instructions on keeping persistent data on the server, or provide instruction? Thanks!

    Read the article

  • ASP.NET Show/Hide Sections in a Datagrid row.

    - by ViperMAN
    Hi All, I have a datagrid where each row has information on Employees in a company. I would like to allow each row the ability to show/hide extra information. My first idea was use the CollapsiblePanelExtender from the AJAX toolkit and have each row like this: <ajaxtoolkit:collapsiblepanelextender TargetControlID="panel2"> ExpandControlID="LinkButton1" CollapseControlID="LinkButton1"> </ajaxtoolkit:collapsiblepanelextender> <asp:panel> FirstName | LastName | Phone | Email <LinkButton1> <- this hides/show extra info in panel2 </asp:panel> <asp:panel2> <textbox ="FirstName"> <textbox ="LastName"> <textbox ="EmailName"> ... ...lots of textboxes where information is assigned from the database. </asp:panel2> This works very well but it can be computationally expensive. The extra information panel has a lot of textboxes/labels, all of which gets its values from the database. Everytime the page loads all the data is got from the database at the start, some of it is hidden. Is there a better way to achieve my goal? Or is there a way to only load an employees extra details when the Show/Hide button is click? Thanks in advance!

    Read the article

  • Navigating by foreign keys in ADO.NET Entity Framework/MySQL

    - by Werg38
    I am using ASP.NET MVC2 on top of a MySQL database in VS2008. I am using the MySQL ADO.NET connector 6.2.3 to provide the connection for the ADO.NET Entity Data Model. This is mostly working ok, however navigating via foreign keys is causing me a real headache! Here is a simplified example.. Car (Table) CarID PK Colour Doors ManufacturerID FK Manufacturer (Table) ManufacturerID PK Name In the edmx file I can see the 1-many relationship shown as a navigation property in the both the Car and Manufacturer tables. I create a Models.CarRepository that allows me to returns a IQueryable. At the View I want to be able to display the Manufacturer.Name for each car. This is not accessible via the object I get returned. What is best way to implement this? Have I encountered a limitation of the Entity Framework/MySQL combination?

    Read the article

  • ASP.Net MVC: Change Routes dynamically

    - by Frank
    Hi, usually, when I look at a ASP.Net MVC application, the Route table gets configured at startup and is not touched ever after. I have a couple of questions on that but they are closely related to each other: Is it possible to change the route table at runtime? How would/should I avoid threading issues? Is there maybe a better way to provide a dynamic URL? I know that IDs etc. can appear in the URL but can't see how this could be applicable in what I want to achieve. How can I avoid that, even though I have the default controller/action route defined, that default route doesn't work for a specific combination, e.g. the "Post" action on the "Comments" controller is not available through the default route? Background: Comment Spammers usually grab the posting URL from the website and then don't bother to go through the website anymore to do their automated spamming. If I regularly modify my post URL to some random one, spammers would have to go back to the site and find the correct post URL to try spamming. If that URL changes constantly I'd think that that could make the spammers' work more tedious, which should usually mean that they give up on the affected URL.

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >