Jump to content
Xtreme .Net Talk

Denaes

Avatar/Signature
  • Posts

    975
  • Joined

  • Last visited

Everything posted by Denaes

  1. Yes, readonly seems to do what I want. Was this propert new to 2.0? None of the older 1.1 developers have heard of it. Maybe just something they never realized. Just means I have to learn to dynamically swap in a combo for certain textboxes. Part of the reason for this Edit/View mode was about 800k of viewstate brought on by 10 or so comboboxes with long lists. Only loading that data when it's needed will help things out a bit
  2. Pretty much. In my minds eye the border and whatnot would appear on some property change (ie, me setting it to edit or view mode in some clientside event) rather than a mouseover.
  3. Re: Container control Maybe so. If that worked consistantly with all the basic controls without making the text nearly unreadable to anyone with less than perfect vision. Yeah, thats the lowdown. That is very interesting. That sounds like it could be a relatively easy client-side option... well easy is relative when the only thing you know about CSS is how to set some basic skinning. I'll look into that :) Hrmm... I think I'd have to learn how to do part of that in javascript to leave that option of swapping controls on the client. doing it severside would definately be far easier, just not the performance I'm aiming for. Thank you both for your point of views :)
  4. I can't use enabled/disabled controls due to requirements for having a user friendly app (they're hard to read and you can't copy/paste from them). So I'm working on a screen where I have duplicate Panels that I hide/show on postback. One has textboxes/dropdowns/etc and the other just displays labels (which are turned into spans) and basically shows up as text.I hate having to duplicate all the data filling and any changes made to one on the other... and I'm thinking of the other 20 screens I have to do this on. I'm just looking for a decent way to get the "here is the readonly mode" and "here is the updatable mode with editable controls". My one thought is to use Ajax to write HTML, but I'd lose possible server side support as well as component/control support. I'd love to just be able to say "here is my textbox, display it like a span now". Maybe a user control that swaps textboxes for labels? I'm using Infragistics tools, Asp.net 2.0 and MS Ajax 1.0. Any help/advice would be appreciated.
  5. Well thanks for that. That should work. :) Seems odd that Atlas wouldn't address this as they're trying to make clientside coding easier for 2005 and super integrated for "Orcas"
  6. I'm using asp.net 2.0 and the Ajax Web Extensions. I create a control with a label (lblStudentID) and when the page renders, it becomes XXXXX_XXXXX_ControlInstanceName_PanelInstanceName_OriginalControlID If I use Javascripts document.forms[0].getElementById(OriginalControlID) or Microsoft Ajax's $get(OriginalControlID) they wont find a reference to the control. If it were an HTML control, this wouldn't be a problem as ASP.Net 2.0 doesn't rename their ID's. The problem I'm seeing is that in my control, I only have control over the PanelInstanceName & OriginalControlID. I have no idea which control(s) (if any) that my usercontrol will be used in. Is there a programatical way to determine what that name would be? We were hoping that MSAjax would take the ServerSideID and find the ClientSideID, but no dice. On all examples I've seen (AppDev videos, Ajax.ASP.Net or documentation) they use either an html control or hardcode the generated name. I'm looking for something via Javascript or MSAjax Javascript that would get me the "XXXXX_XXXXX_ControlInstanceName" portion that I don't know about and would allow me to append the portion of the name I will know. Something like $get(ControlParent + "_PanelInstanceName_OriginalControlID" that would allow me to create the dynamic client name. Anyone have any tips or advice? I've been googling for days and maybe I'm not using the correct terms, but I'm not finding anything. I'd greatly appreciate any help on this subject
  7. If I have a Stored Procedure and use the SqlDataSource to connect to it, my grid (MS or Infragistics) picks up the schema no problem and gives all the columns a basic formatting with what it believes the schema is intending. Not always perfect, but it's a starting point. Now I take the same Stored Procedure and access it through a WebService or an SQLServer Endpoint (turns a stored procedure into a web service call) and I add the WebReference to my project. Everything is looking fine and when I view the ASMX file (for the WebService) I get a list of methods and when I Invoke one, I see a schema prior to the returned information. But I connect an ObjectDataSource to a WebMethod on the WebService and connect a grid to the ObjectDataSource I get nothing. Just a blank grid. It's not showing the schema at all. All the examples I find of a GridView consuming a WebService shows it being bound in code, which doesn't allow you any designtime support and the GridView then displays all columns with default types and column names. How do you actually consume a Web Service correctly so that it conveys the schema?
  8. Technically speaking, yeah. They're rendered into 100% HTML & Javascript, ie DHTML ie AJAX. They expose many Client Side and Server Side events, so you can choose how you want to handle them. You can also configure if you want to run them clientside (Ajax) or server side. From draggin a combobox or a grid onto your WebForm, you can define or choose a datasource, configure how the control will be laid out, which columns will show, etc and just run the form and the page renders with all the data. Not a single line of code. It is great. It really bothers me when a company totally undermines their own employees and efforts by not supporting their employees with training and proper hardware/software. I've seen companies not want to buy training material, then spend 10x as much money on employees floundering around to get a job done; a job they could have done faster and probobly better with some good solid training. Same with software. One company paid a developer for over a year to write an internal ASP.Net application for tracking projects and status because they couldn't fit it into their budget. True, the developer learned a LOT in that time, but they spent way more on salary and had to wait a year to get software with 1/100th the features the commercial versions have. Some companies would rather you do things yourself than buy controls, which is so silly. for less than 1 weeks pay for each developer, you can purchase a suite like Infragistics or ComponantOne which would save way more than 40 hours over the life of a project between development and debugging. I'm very happy that our management gets this and is super supportive.
  9. On this new project we're working on, it seems like less and less. Data/business layer is in TSQL in the SQL Server supplying Web Services. The front end is using Infragistics controls primarily and will be 100% client side DHTML/AJAX, so everything after the Page_Load event will all be in javascript. So far with my Infragistics controls for the last 10 pages I've made yesterday, not a single line of C# (that I've written at least!) in them. Between the configurable controls and javascript, everything is taken care of. We'll have to write some code and maybe even a postback for logging in and Permissions/Roles. The really funny part is that the company bought us AppDev training videos for C#, but not the Atlas/Ajax one yet, so we're watching videos and learning all about .Net and not really using most of what we're learning right now. Anyone else have a similar situation?
  10. Every time I think I figure out how to make a dataset really viable (over just datareaders and functions calling SP's) I think it through further and it seems like they're too much overhead for how little functionality they give you (at least in comparison to the 'sets in WinForms). Doing a normal declaration, your dataset won't be there for a postback (it'll be on the old pages instance and not the new pages instance) and if you're not going to keep data around, you might as well just hose it out. Datasets are more for being a temporary cache of data. You could serialize the data and send it back & forth, but that seems less efficient than just requerrying it. You could declare the dataset as Shared, but it seems that all users using the same page will be using the dataset, which may not be what you want or expect. It looks like I'll be using a lot of AJAX by way of Infragistics controls and maybe theres a solution in there with partial loading pages and querrying the database without postbacks. But am I missing something obvious? Am I just expecting too much of datasets in WebForms because of how I use them in WinForms?
  11. Yes, I'm still new to ASP.Net 1.1 & 2.0, but I've been using WinForms for a few years (since 2003 I think?), so maybe my perception on bottlenecks is skewed here. We're running an enterprise level ASP.Net 1.1 application which also has many pages still in Classic ASP. The Server is "2003 Server" on a modern cutting edge server... core duo or core quad or whatever. The database is SQL Server 2000. This app has been around for a while, so this hasn't always been the OS or server computer. In comming to this project, the developers keep on saying that we need to handle things clientside when possible. Not for ease of use, but to save the server from bottlenecking. We have like 400 users max, spread throughout the day (if everyone had to use the app in a single day, which isn't always the case). How would you figure out how many concurrent users? Maybe a few hitting at relatively the same time. I don't know, it just seems that we're stressing ways to prevent serverside processing and from my perspective, it doesn't even seem like we're comming close to maxing out the Web Server or SQLServer's capabilities, yet we're doing silly optimizations to avoid the overhead of a datatable. Maybe I'm just spoiled being a winforms developer. Any thoughts?
  12. I'm not sure if it's just cookies... maybe sessions or something else I'm not aware of. I've heard that as a concern. Maybe if I found a site or document that compared using both versions in the same webapp. Personally I have a lot to update from ASP as part of my learning of the app and it seems silly to upgrade it to 1.1 if we do want 2.0. Especially because I've been learning 2.0 and I really like it. While the theory goes that the company will pay us to upgrade to 2.0 someday, we have a lot of custom projects from paying customers within the same app so if it's possible, it's most likely going to happen a few pages at a time as needed, which is why I was checking. I found a msdn 1.x -> 2.0 conversion guide and it doesn't even address what I'm asking, just talking about doing the whole site in one fell swoop.
  13. I'm working for a new company, the application is mostly 1.1, with ASP pages and compiled com objects. My first job is to get rid of all the ASP & COM objects by bringing them up to ASP.Net. We all want to use 2005, but we don't have the time to convert the entire application (it's pretty large with hundreds of pages). Would it be possible for me to upgrade the asp/com to 2.0 while the rest of the app is 1.1? Then convert sections, to 2.0 one at a time? I know it's possible to have them as seperate pages on the same server, but we need them to share cookies and whatnot as part of the same application login. So you might login to a 2.0 page, then navigate to a 1.1 page, then a 2.0 page, etc. Doing this, if it's not too Hacky, would save us from having to upgrade to 1.1 then do 2.0 in an entire fell swoop.
  14. Cool, good to know. Thanks for the info :) I'm beyond that, normally using a code behind file now as well. I guess the book was trying to keep things simple early on. One thing I noticed when they first talked about the <script> tags and assigning a language there as well as in the page directive, my first thought would be that it would be mad cool to have a VB & C# tags in the same page, but the book says that you can only choose one language. so if you have VB as your page directive, you can't do a script block of C#. Can you mix it up with Javascript or one of the intellisense supplied scripting languages? Like have a VB Page and insert a JScript Script block?
  15. Yeah, this is pretty minor and kinda silly, but when I type this line: <script runat="server" language="VB"> and I get to the language tag, it suggests: ecmascript, javascript, jscript & vbscript. I'm using VS2005 and following a book on learning ASP.Net. It's just annoying each time I try to type "VB" "vbscript" is inserted and I have to go back and delete it. In this case I do not have a page directive stating that I'm using VB, so the tag is required. Thanks if anyone knows why.
  16. I always figured it was Mono or SharpDevelop (#Develop). Never heard of the World Wind Project before. I'm not 100% if Mono is open source, but I think so. I'm almost positive SharpDevelop is open source.
  17. Okay, I really went an easy route as I already had much of the pertinent info for shapes stored in objects already and everything had to be recalculated with redraws because I change sizes along with form resizes. So here is how it works: PiePath = New Drawing2D.GraphicsPath PiePath.AddPie(CircleRect, StartAngle, SweepAngle) If PiePath.IsVisible(MouseLoc) Then ' Mouse is over wedge, so highlight the wedge and display it's info g.FillPie(Brushes.Gray, CircleRect, StartAngle, SweepAngle) End If g.DrawPie(PiePen, CircleRect, StartAngle, SweepAngle) This checks each wedge prior to it being drawn and if the mouse is in it's shape, I use the FillPie to give it a color (kinda like highlighting it). This ended up being super easy with the GraphicsPath object, thanks :)
  18. Hmm, the graphicsPath seems like a good place to store the image. Just have to see if there is an easy way to do it (ie, the .draw<shape> methods) or if you have to draw the shape by hand. Edit: GraphicsPath.AddPie works the same as Graphics.DrawPie (or so it seems) so I'll create an object for each of the shapes that will handle their graphicspath and checking mouse and drawing the shape to the screen. I'll post here later with an example if I get it working as I hope for future people with a similar problem
  19. Unfortunately not right triangles. Searching around I've seen mention of creating objects for each shape and then looping through the shapes to see if the point is in/out of bounds... that does simplify things a little, but you still have to compare the points to the shape/location of the shape you drew. A few tests rely on making a bitmap of the drawing (I think of the whole drawing screen because I don't think you can make irregular sided bitmaps), but those do a check for the color of the pixel at the point given, which works for color coded shapes.
  20. I'm drawing shapes on a picturebox. I want to know when I'm inside of a shape (and also outside of a shape). This is really easy for a rectangle, you just check the X & Y & width & height to see if the mouse is inside. Like say I have a wedge (using a piefill method to draw). The Rect covers the whole circle, but the Wedge is drawn with the Rect, a starting angle and an ending angle. I'm just not sure how to get at those points in the angle... I'm not sure if there is a method for the premade drawing methods that does this or if I have to use the easy methods and then do it all myself to find the points anyways (I guess by figuring out the two lines and the arc)
  21. Okay, sounds good. I replaced "StatusStrip1.InvokeRequired" with "Me.InvokeRequired" for the Form. I guess the exception pointing to the wrong control falls under MS's explaination of unexpected errors when referencing a control on another thread. But so long as I have things working, thats cool :)
  22. Hmm, I seem to have that solved. I think part of the problem is that ToolStripStatusLabel doesn't have the InvokeRequired property, so the app was never picking up that I was assigning it cross thread or something and just letting me do it unsafely. I created a delegate and a Set method that can work cross thread like so: Delegate Sub SetTextCallback(ByVal [text] As String) Private Sub SetStatusLabel(ByVal [text] As String) ' InvokeRequired required compares the thread ID of the ' calling thread to the thread ID of the creating thread. ' If these threads are different, it returns true. If Me.StatusStrip1.InvokeRequired Then Dim d As New SetTextCallback(AddressOf SetStatusLabel) Me.Invoke(d, New Object() {[text]}) Else Me.ToolStripStatusLabel1.Text = [text] End If End Sub This is how Microsoft says to access a Form.Control cross thread, but ToolStripStatusLabel doesn't have an InvokeRequired property, so I used it's parent controls InvokeRequired. I'm not sure if this is the best thing to do, but it seems to be working
  23. I have an app that is very basic so far. Its current goal is to read a lot of data about files in a particular directory and it's sub directories. This can take a while if it's like the C:\ directory. So far it's just has: Toolstrip (has a combo with directories and a button to start the scan) StatusStrip (with a ToolStripStatusLabel on it) Pretty basic. As you process each directory I want it to display text indicating which directory is being scanned on the ToolStripStatusLabel. The First Problem: Scanning ties up the thread, so it never actually writes any text to the ToolStripStatusLabel. I solved this problem by adding a BackgroundWorker to run the scan and this works pretty well. The scan runs, text is displayed on the ToolStripStatusLabel as it should. The user will see directories being worked on as the app works through them. I understand that I'm access the ToolStripStatusLabel from another thread and the application seems fine with it... normally. The New Problem: Now if I change the size of the window (which I could see a user doing to see more of the directory names or to make the app smaller) I get an exception: System.InvalidOperationException: Cross-Thread operation not valid: Control 'AppToolStrip' accessed from a thread it was created on. and it continues to refer me to the line the exception is on, which is where I'm setting the text for the ToolStripStatusLabel. Now the part that throws me for a loop is that the line is assigning text to the ToolStripStatusLabel (which is on the StatusStrip) while the exception says that there is a cross-thread problem with the ToolStrip control, which there isn't any code manipulating. I don't get why this only happens when the application is resized at runtime during a scan and not when it's left alone. Any clues or workarounds?
  24. More info here: IdeaBlade, but in effect it's supposed to be a program that replaces your normal data access layer by creating objects. The Express Edition is free and looks decent. I installed at home without problems, though the installer looked a bit dated. Apparently if you buy the Pro Version it works with certain other 3rd party controls like Infragistics. Thats cool, but I thought 2.0/2005 had a standard collection interface(s) to implement to make a datasource, so I'm not sure why a datasource would work with .net controls and not Infragistics. I believe the super duper version works for over the internet stuff... not really my area of work so I didn't really check it out. The company/product is a MS Partner and if you search for "IdeaBlade" or "DevForce" you get a lot of hits about the controls and some articles. Personally I've worked with the DataSets a bit and I don't really care for them. I can make use of them, but the idea of classes of normal code just seems more familiar or natural to me. But I'm curious about any developer stories or opinions.
  25. You could also buy Infragistics and use their controls. Aside from the awesome control features and extra controls you can use, there is an application skinning feature built into them to make everything pretty. It wouldn't get you buttons shaped like pac man (or whatever) but if you just want to make your app all glossy and pretty and consistant, it's the easiest way I know of.
×
×
  • Create New...