I have a 50 x 50 image button layout. That's 2,500 image buttons. I want to assign each imagebutton a picture depending on what is in the database. Will this be too much to do? Is there a faster way?
I have 3 servers where 1 of them serves as a load balancing server. In my ASPX page, I want to add a HTML comment to show the IP address or even host name of the server selected by the load balancer. I tried looking through IIS Server variables and tried using SERVER_NAME but that just returns the domain URL.
I'm really new to MVC (just started a few weeks ago) and new to Ajax (never looked at it before today). I need some design / technical advice concerning Ajax, MVC, loading partial views, and posting / getting from a view. What I'd like to do it load a partial view that takes in a list of objects that have been queried from my db into an details-type view. The details view already has some other content that has been handeled and loaded from information pulled from my database and setup through some actions. It is strongly types to a model.
Below is the partial view I've created thus far:
[Code]....
And here's a portion of the Details page:
[Code]....
I'm not sure what to do for the Ajax.ActionLink. I'd like for a use to be able to type into the text box on it's left and hit "Add" (the Ajax link) and have the application add the content in the text box to the database. Should it be something else? An <input>? The Controller code piece is below:
[Code]....
So it should be adding the member into the repo / db and then reload the contents of the partialview. Instead, it's reloading the whole page and not just the partial view. (the url is changing from /project/details/5 to /project/membersection/).
How do you reference a LINQ object that you have created such as a list, in your HTML? I have seen examples of how to do this using MVC, but I am using Web Forms. Here is my LINQ :
[Code]....
And I want to be able to for example check if my linq returns any data and if so iterate through it using a foreach loop in my HTML. change my linq so that it returns a generic list rather than what it is doing at the moment.
I am creating HTML objects in my code, and giving them IDs (see below) :
[Code]....
But whenever I try to make reference to this ID in my code, it does not work. After viewing source, the ID has been changed to ctl00_ContentBody_divMTR. Why is this happening and can I prevent it?
have some Objects, lets say Employee and Role defined as below and I have defined relationships in my database that gives me a list of objects say employees and thanks to my framework each employee object also has a Role object linked via the RoleIDID, UserName, Password, Email, RoleIDRoleID, RoleNameSo in code I can do something like this
I know how to bind a simple objects to a dropdown list. However I am having problems binding my objects which contains sub objects to the control.i.e. with simple object i just do ddl.DataValueField = "myproperty" with my objects they contains sub objects which i want to bind. I have tried ddl.DataValueField = "sub-object.myproperty" which doesnt work.
firstly a static class only ever exists once and is not an instance. Any static members (ie static int NoOfPeople;) is stored in one place and is shared between all sessions (like the old global variables). Now static methods is where i'm not 100% sure. If I have a static method that doesn't use any other static members could this cause inconstant results, example (this is a fairly pointless method but just a quick example of the top of my head)
[Code]....
So in this example if two sessions (or threads) were to call this at the same time - would they both get back the expected results, because the method only uses private data (a, b and totalToReturn).Im sure this sounds a little simple but I will be using static methods to build user objects and various other objects that there will have to be a 100% garentee that the objects will not get mixed up between sessions and the wrong things return to the user.
We have a pretty big database with hundreeds of procedures, triggers, functions, views, etc. Now we are in the process of moving from VSS where SQL Objects were not added to the TFS. Is there an efficient way to add all the SQL Server objects to the TFS?
I have to find a design decision for the following task: I have a SQL Server database and it contains a table of orders. PDF documents will be uploaded by users through a simple file upload from a web page and assigned to an order. There is not more than one document per order (perhaps no document, never more than one). For this purpose a user opens a web page, enters an order number, gets the order displayed and clicks on an upload button. So I know to which order the uploaded document belongs to.
Now I am considering two options to store the documents on the web server:
1) Extend my table of orders by a varbinary(MAX) column and store the PDF document directly into that binary field.
2) Save the PDF file in a specific folder on disk and give it a unique name related to the order (for instance my order number which is a primary key in the database, or a GUID which I could store in an additional column of the order table). Perhaps I have to store the files in subfolders, one per month, and store the subfolder name into the order row in the database, to avoid getting too many thousand files in one folder.
After the PDF files are stored they can be downloaded and viewed via browser after entering the related order number.
I'm tending towards option (1) because the data management seems easier to me having all relevant data in one database. But I am a bit afraid that I could encounter performance issues over time since my database size will grow much faster than with solution (2). Around 90% or even 95% of the total database size would be made up only by those stored PDF files.
Here is some additional information:
The PDF files will have a size of around 100 Kilobyte each Around 1500 orders/PDF files per month Windows Server 2008 R2 / IIS 7.5 SQL Server 2008 SP1 Express Not quite sure about the hardware, I believe one QuadCore Proc. and 4 GB RAM Application is written in ASP.NET Webforms 3.5 SP1
(I am aware that I will reach the 4GB-limit of the SQL Server Express edition after around 2 years with the numbers above. But we can disregard this here, either removing old data from the database or upgrading to a full license will be a possible option.)
My question is: What are the Pro and Contras of the options and what would you recommend? Perhaps someone had a similar task and can report about his experience.
I have problem in maintaining the application objects in the server when it is deployed in the web farm.In our application i'm storing the sessionID and and the column value ( "tvktnx55vl5mzr453dmaehit " + "A101" ) in arraylist and storing it in application object. when i test this it is ok. but when we deploy it we have one issue that is we cannot share the application object in web farm.
I have recently updated from web developer 2008 express to 2010 and notice that the drop down for server objects & events that is included in the 2008 edition does not seem to exist in this edition. I have tried all the settings and switched on Experts settings and imported all the expert settings but to no avail.Is there a different way to select events in 2010 version (I was using it to import procedures mainly for validation).
I am storing html of error pages of my site in sql table, i want to display them in a window, on the admin side, but not able to load the saved html in iframe, i am using asp.net mvc2.
its needed to save the pages, and display later to admin.
Does anyone know how to load the HTML element of https in asp.net?say.. you have the following url: https://somesite.com/secure/site.aspx. How do I programatically load the html content of the this url?
I added a Input (Text) control in my web form and turned it into an HTML server control so its an instance of HtmlInputText class.
If I double click on the control It only adds a OnClick event handler method inside the script tags in the HTML doc of the web form but how to I get to handle its Serverchange event exactly? does VS.net 2008 has no ability to auto wire up the event to the control, do I have to manually wire up the event handler?
what i am trying to achieve is that. when any of the links is clicked. the <a href> tags are replaced by <span> tags. Is this possible? i tried playing aroung with HtmlGenericControl class but i could not solve it.
I want to load part of a html-file (content.htm) in my project into an iframe in my main page (main.aspx).
Also, I want that content to take on the css, javascripts and filepath of the main page.Is this even possible?
It seems iframe is almost a separate browser, and no settings from the main page will affect it. CSS does not work, nor does the filepaths since the content.html is located in a subfolder.
I'm working on a project in which we have a database, data layer (entity framework), business layer and web/UI layer.I want to use ASP.NET Dynamic Data for the web layer, but don't want it to access the data layer or database, as I want it to be purely running off business logic, and not directly accessing the data.However, it appears that Dynamic Data only allows Linq-to-SQL or entity framework data sources to be used.Has anyone used it with business-layer objects instead?
I have just run into a situation with a FormView control where any markup that is not given an ID and runat=server attribute is NOT rendered to the browser.
In other words, all of the extranneous markup (h#, fieldsets, legends, divs, labels, etc.) that are in my Edit Template DO NOT render to the browser at run-time. However, if I add an ID to any of those items and add runat="server" then they are rendered.
Has anybody every seen anything like this? Does anybody know what could possibly cause this?