|
I'm just learning .net and have run into something I can't figure out. Using asp.net to connect to an access database. The access database has a few tables, and I have some drop down forms that allow you to filter the data on the main table. When you click on an item once filtered, it selects the data from the corresponding table using as an example "select * from other table where code = ?", the code is supplied via the browser string, etc. It's all done except for the last page, which is slightly different than the others. Two variables are sent in the address bar, and depending on which data is supplied a different select statement is used. This is an on load event: code:
This is the error I get: code:
|
# ¿ Apr 18, 2008 14:53 |
|
|
# ¿ Apr 28, 2024 12:30 |
|
I'm trying to add some code to a VB project I didn't create and am running out of ideas. I'd not really a developer, this is one of those things that were thrown at me, as I'm still on Chapter 1 of my C# book. I have a panel with ID panServiceDetailID, a form with ID fvServiceSummaryID and a Datasource named ODS_ServiceSummary. It pulls from a table showing basic information about a township. I want to use some of that information in another datasource/gridview, but I keep getting "Could not find control 'Sys' in ControlParameter 'sys'". Searching for this error says that I'm improperly referencing the control and suggests using the controlpath followed by a dollar sign, then the control. Here is some sample code: code:
So I have another gridview below with the following code: code:
|
# ¿ Oct 9, 2008 19:40 |
|
Thanks, that worked. I removed the hidden variables, made the three identifiers (sys, prin, agent) datakeynames for the gridview gvServiceSummary and then changed the control parameters to:code:
I'm running into one more issues though. There are two ways to run the query, you can manually enter the zipcode into a search box, or you can reach the detailed page via another website or application. The sys prin agent information is a string in the URL, example being default.aspx?corp=999999999999 My select statement for this is currently: code:
code:
|
# ¿ Oct 10, 2008 21:03 |
|
Nurbs posted:Everything after the ? in your url is part of the querystring. So what you need to do is add a querystring parameter in the select command instead of using the control parameter (I assume each method is on a different page), or just create another datasource and change the grid's datasourceID to the id of that datasource when you're going to use that search method. Don't forget to rebind if you go that route. Uziel fucked around with this message at 18:43 on Oct 13, 2008 |
# ¿ Oct 13, 2008 18:29 |
|
I am having an issue with Crystal Reports in Visual Studio. Everything with the report itself is actually working fine, but when I finished styling the MasterPage, the report format gets misaligned. I have a report with an embedded subreport, and when using the MasterPage, the any subreports move out of alignment to the far right of the page. This is only IE, as it renders fine in Firefox and Safari. Unfortunately, I only have to develop for IE in this case. This is what it looks like in IE: http://i39.tinypic.com/akwtit.jpg
|
# ¿ Feb 11, 2009 22:02 |
|
I'm creating a custom web user control in c#. It is intended to interact with a permission hierarchy. We have different "sites" and each site has many "apps" and each app has many "permissions" So, We have a TabPanel that loads a tab for each site. Then in each tab we have a TreeView where the parent nodes are the apps and the inner nodes are the permissions. The Permissions show check boxes based on some criteria and are checked based on whether or not the HasPermission function returns true. All of this code works...but only for the first user selected. For any subsequent user chosen, a step through the debugger shows all the correct logic being executed, but the page displays the same information as that of the first user selected. So basically, it's saving the display somewhere...and I'm at a loss to find out where. code:
|
# ¿ Mar 17, 2009 17:44 |
|
I'm having an issue going between content pages and a master page. In the master page, my navigation is based on a list. I need to change the ID of a specific list item based on which directly the content file is in. Here is what the master page looks like: code:
code:
code:
Uziel fucked around with this message at 21:14 on Mar 25, 2009 |
# ¿ Mar 25, 2009 21:09 |
|
Mick posted:What you've pasted here: is this output from a server control or just straight html that you put into the Master page? The design is pretty specific and I don't think there is a control for an unordered list with list items?
|
# ¿ Mar 26, 2009 14:14 |
|
Uziel posted:Straight HTML in the master page. I added an ID and run at server attribute to the li markup: code:
code:
|
# ¿ Mar 26, 2009 17:51 |
|
Is there an easy way to start/stop/restart services on a different server? I was looking at this (http://www.csharp-examples.net/restart-windows-service/) but this would indicate same server services. Situation: We have a service that sometimes needs to be rebooted and instead of us answering off hours support calls to just restart a simple service and would like to integrate the restart ability into the web app itself. Also, is there a way to check for orphaned processes on a remote machine? The above service has another 3rd party exe that it opens and the service cannot be correctly restarted unless any orphan exes of that specific type are closed first.
|
# ¿ Jun 16, 2009 19:42 |
|
Code Jockey posted:^^^^ Ohhh man I want to know this too, I've got a few services that I'd kill to be able to control / monitor status of via web app! Edit: It works for monitoring status, stopping and starting the service. Really simple: code:
Uziel fucked around with this message at 21:05 on Jun 16, 2009 |
# ¿ Jun 16, 2009 20:15 |
|
I'm working on some error reporting for our site, and some XML is stored as varchar in our error reporting table. I am able to generate the XML correctly, but I also want to prompt to save the XML file. Response.TransmitFile wants a physical path, but the file doesn't exist. I want to create it on the fly and prompt for download. Here is what I have thus far: code:
|
# ¿ Sep 29, 2009 19:35 |
|
Fiend posted:If you change the content type to something the browser doesn't recognize, like "text/NotAXml" it'll prompt you to download.
|
# ¿ Sep 29, 2009 20:14 |
|
A coworker helped me figure it out. So damned simple =(code:
code:
|
# ¿ Sep 29, 2009 20:32 |
|
I'm having issues disabling a button control and still having it process that button's click procedure. Basically, our users love to hit the submit button multiple times. I'd love to disable to the submit button and change it's text to Processing. I'm able to change the text and disable the button via javascript (the on click click event), but then it doesn't process the procedure for btnSubmit_Click. Any ideas? Uziel fucked around with this message at 17:40 on Feb 24, 2010 |
# ¿ Feb 24, 2010 17:38 |
|
Sprawl posted:You should be able to ".Disabled = true" in javascript iirc.
|
# ¿ Feb 24, 2010 17:52 |
|
Sprawl posted:Or are trying to make it so hambeasts can't mash submit a bunch of times and have to start multiple processing's?
|
# ¿ Feb 24, 2010 19:39 |
|
This is the most mundane thing, but I'm pulling my hair out over it as I can't seem to phrase it correctly for a search engine. I simply just want to move the Select button on my gridview to the right side instead of being on the left. The gridview itself is populated by linq in the code behind.
|
# ¿ Mar 8, 2010 21:33 |
|
Sprawl posted:If i'm thinking right that's the command column that's part of the gridview so you should just change that.
|
# ¿ Mar 8, 2010 21:43 |
|
Sprawl posted:Ah that would be done in the display time part. The only thing I had in columns was the command column, the datafields were being generated by linq, so their code looked like: code:
Anyways, yeah. Repeater should be a bit easier.
|
# ¿ Mar 9, 2010 19:17 |
|
Crepthal posted:Sorry if this is a stupid question. I'm pretty new to working with AD in .Net. code:
|
# ¿ Apr 7, 2010 16:00 |
|
This is a rather general question that applies to multiple separate instances: When using validators, they sometimes don't fire if there is a server timeout and incorrect data goes through into the database. Is there any over reaching fix or work around, or does this need to be tackled on a case by case basis? If so, where do I start? In the current example, in debug on localhost, a time out error is thrown and the data goes through. On the web server/live, the user doesn't seen an error and the data gets inserted.
|
# ¿ Oct 6, 2010 13:40 |
|
I'm working with a Business Layer Object in C# that I'm serializing to XML, storing that XML in a table as text, then retrieving the XML and deserializing that XML back into a Business Layer Object. Having never done this before, I'm rather lost. I am able to store that Business Layer in the ViewState and retrieve it with deserializing/serializing with no problems. The Business Layer Object is called Builder. View state example of loading the business layer object: code:
code:
However, I cannot seem to figure out the loading from the database: code:
There is an error in XML document (2,2) InnerException: Use the "new" keyword to create an object instance InnerException: Check to determine if the object is null before calling the method Any ideas or advice? Uziel fucked around with this message at 15:12 on Dec 16, 2010 |
# ¿ Dec 16, 2010 15:00 |
|
epswing posted:Do the contents of Builder not fit well with a relational database? I have to ask myself "is there a good reason to store xml as text in a column of an rdbms?" because it doesn't make too much sense.
|
# ¿ Dec 16, 2010 15:39 |
|
I figured it out, it was an issue with my classes and the serialization, not the retrieving of the XML. I had to make a blank public constructor in the classes when serializing and neglected to have some of the necessary properties have both get and set. :|
Uziel fucked around with this message at 18:47 on Dec 16, 2010 |
# ¿ Dec 16, 2010 17:58 |
|
I'm running into a weird error regarding rebinding a gridview after editing the data source that it pulls from. After editing the gridview in another panel and hitting the save button, the gridview's data is repulled from the database, but in Chrome and IE8 on the server (but NOT on localhost) the gridview defaults to edit mode with the changed data item as the selected row for editing. Edit: Figured it out, had to set EditIndex = -1; Uziel fucked around with this message at 20:15 on Oct 18, 2011 |
# ¿ Oct 18, 2011 19:53 |
|
Are there any recommended resources for getting started with WPF in .net4.0? I mostly work on web stuff but have a project that needs to be a desktop app.
|
# ¿ Dec 17, 2011 17:10 |
|
Ithaqua posted:No idea. Dump LINQ to SQL as soon as you can, it's a technological dead end. It's a decent proof of concept, but pretty much every other ORM is better.
|
# ¿ Apr 11, 2012 23:27 |
|
Dromio posted:A year or so ago, we needed to start to introduce nightly maintenance processes to our system. W
|
# ¿ Apr 21, 2012 15:30 |
|
Are there any similar resources to Microsoft's "Improving .NET Application Performance and Scalability" (http://msdn.microsoft.com/en-us/library/ff649152.aspx)? I'm sure some of it still applies, but its based around SQL Server 2000 and .NET Framework 1.1.
|
# ¿ May 1, 2012 17:00 |
|
This will probably lead into a bigger question, but I'm working on improving single user performance for an intranet application that has become business critical. We are unfortunately storing large custom objects in session state (using session state server) and are paying a performance price due to the serialization/deserialization. I bought our team Ultra-Fast ASP.NET (http://www.amazon.com/Ultra-Fast-ASP-NET-Build-Ultra-Scalable-Server/dp/1430223839) and we are going through it, but given that we are using a single web server web garden, using cache for everything isn't ideal either (distributed cache also serializes/deserializes from what I understand). I was starting to look into MVC, as its moving toward a stateless nature, but from what I've read there are still usages for session as our application is closer to "shopping cart" than basic "use a form to edit something in a database". Any thoughts or opinions as to what direction we should be going? If more information would help, I can elaborate.
|
# ¿ May 28, 2012 14:38 |
|
I have two ext js async tree panels and I'm loading their respective data via generics handlers (ashx). Is it best to just have a handler for each tree or have one handler that returns both types of data? What happens if both tree panels request to load at the same time? Is the handler that each points to run as a separate instance?
|
# ¿ Jun 1, 2012 18:48 |
|
Xae posted:Awesome, exactly what I was looking for to multithread. quote:The => token is a direct substitute for the delegate clause. When the compiler sees the =>, it says that the preceeding part of the statement is the parameter list of a delegate, and what follows the => is the statement to execute.
|
# ¿ Jul 8, 2012 18:59 |
|
I am trying to fix a news feature of our primary site. I am currently using TinyEditor to submit/edit news, and it works fine. My issue is displaying that HTML. I have a control to display the news that contains a repeater, with a template that has a label for the title and a literal for the article itself. On ItemDataBound, I set the literal's text equal to the decoded html, and it looks just fine in the mark up but on display none of the markup works correctly (ie, an unordered list with list items does not become a list, just a giant block of text). I feel like I'm just trying to hammer fist a solution, and since displaying decoded HTML can't be a unique problem, I wondering which direction I should be looking at. My current "fix" is using Ext.NET's HTML editor in read only mode, and setting its value equal to the decoded HTML. This works but I cannot seem to get rid of the control's border or toolbar.
|
# ¿ Aug 14, 2012 13:38 |
|
I'm starting a personal project in order to have something to put on my Github and for my resume as I don't have ANY personal projects/code examples because I "grew" into my current job as a developer and the last thing I've been wanting to do is program in my off time, plus I couldn't ever think of any passion projects. However, I finally have an idea, and I'd like to take this opportunity to try out some technologies that I haven't been able to fully utilize at work. Its essentially just a network equipment inventory tracker (these are the pieces of network equipment we have, these are our office locations, this office location has these instances of the equipment with these serial numbers, here are their IP addresses, etc). My thoughts are MVC4 Web API and WPF MVVM accessing same database, and I'd like to use unit tests as well (which we don't do at work). Any thoughts on things I should do to make sure I don't duplicate code between the web and windows application sides? I've done this before using ASP.NET forms and classic Windows forms, but I wasn't sure how this translated to MVC and MVVM as far as not duplicating code (since both are similar from my understanding).
|
# ¿ Sep 2, 2012 15:05 |
|
Ithaqua posted:If you want to share the exact same UI between web and client, you might as well just do it in Silverlight. Then you don't have to worry about platform differences between web and client, you just do the whole thing with XAML and MVVM. So I'd have the same data layer and then a single model for both, but then a separated out project for the site and desktop app respectively. Any particular examples you'd recommend in regard to best practices for unit testing, designing for it, etc? (unrelated but a new OP with links to the most update to date best practices, etc would be mega helpful) Uziel fucked around with this message at 18:04 on Sep 2, 2012 |
# ¿ Sep 2, 2012 18:01 |
|
Thanks. So I'd have 5 projects (Web, Client, Model, Data, Tests) and things like View and Controllers would just be folders within? Or separate projects for say Web.View and Web.Controllers? I will check out that book and setting up a build/revision server. I have a WHS server on my home network I will look into using for that purpose. Ithaqua posted:I'd probably break the project structure up like this, assuming it's sufficiently complex:
|
# ¿ Sep 2, 2012 18:39 |
|
Ithaqua posted:Nope, each of those things I mentioned was a separate project. The reason you split up your test projects is so you can set up your builds to only run the tests in a specific project. For example, your CI build might only run unit tests, but your nightly build would run all of the tests. If I am posting my code is there a preferred way if I'm asking for pointers? Or is a github link enough?
|
# ¿ Sep 2, 2012 20:21 |
|
I'm finally getting to a project that's a perfect place to utilize MVC (Microsoft's implementation). Is it possible to mix MVC and regular ASP.NET webforms in a single project? I'm asking as I'm not sure some aspects of the project would either work or have the development time to learn how to do the more complicated aspects while other facets of the project as a simple as get a collection of data from a database, or add data. Edit: I'm reading this post by Hanselman (http://www.hanselman.com/blog/PlugInHybridsASPNETWebFormsAndASPMVCAndASPNETDynamicDataSideBySide.aspx) but was curious if there are any more up to date resources for MVC4, etc. Uziel fucked around with this message at 17:03 on Oct 29, 2012 |
# ¿ Oct 29, 2012 17:01 |
|
|
# ¿ Apr 28, 2024 12:30 |
|
I hope there is something simple I'm missing, but I asked in this thread a few days earlier about combining MVC with asp.net web forms and was given the advice of just try to do everything in MVC. I went through the MVC4 Movie site tutorial, and everything makes sense as far as how simple that application is. I'm now trying to convert the simpliest of our applications to MVC and running into something that seems trivial in webforms but I just don't get in MVC. I have two drop downs. Selecting a value in the first clears the 2nd drop down and repopulates with data revelant to the selection of the data in the first. In this context, you have various manufacturers. You select one and the valid models for that manufacture are now in the second dropdown. This would take like 30 seconds to write in webforms. Any ideas? I found this on Stack Overflow (http://stackoverflow.com/questions/11260086/cascading-dropdown-list-in-mvc-4) but this uses a button post back to populate the second drop down which I'm not able to do. Part of the problem is that I want to work in MVC4 but don't know if solutions I find (if any) for the problem in older versions are the best practice way to do them in MVC4.
|
# ¿ Oct 30, 2012 19:49 |