Jump to content
Xtreme .Net Talk

bizzydint

Avatar/Signature
  • Posts

    75
  • Joined

  • Last visited

Everything posted by bizzydint

  1. Thanks! So obvious - cant believe I forgot about that one....
  2. I'm attempting to have a bit of javascript that counts how many checkboxes are ticked and displays a simple alert when the user goes over the specified maximum. That part is simple. It gets slightly more complicated in that there are several lists of items with different maximums on each list (eg select 2 items from List A and select 5 items from List B etc). So the javascript simply calls the functions with "CountChecked(this, maxCountAllowed, GroupID)" and it works out what it's doing. Still simple. The problem is that all the data comes from a database and is completely variable. The asp.net checkbox control is letting me have a "onClick" command (although it's grumbling that it doesnt support it but it lets it through anyway) - but I cant seem to put variables in there... This works fine: <asp:CheckBox ID="cbx" onClick='CountChecks(this, 3, 1)' Runat=server> </asp:CheckBox> But not this: <asp:CheckBox ID="cbx" onClick='CountChecked(this, 3, <%#groupID %>)' Runat=server ></asp:CheckBox> It doesnt error - it simply writes "<% # groupID %>" onto the HTML instead of working out what the value of groupID is and putting that in. It's all databound etc. Am I missing something obvious?
  3. I'm having trouble detecting whether user's have cookies enabled on their browsers. Basically, our users are not entirely technically competent and therefore, if cookies are not enabled, we need to put up a message to tell them. But, "Request.Browser.Cookie" returns whether a browser *can* do cookies, not whether the user has them switched on (so for IE 5+ we always get back true!) I've tried setting the authcookie and retrieving it, but this refuses to work. I've also tried setting a tester cookie on page load and then retrieving it when the user logs in, but it doesnt pick it up. Any ideas?
  4. perfect! just had to add a DROP TABLE #temp to the end. Cheers - you're a star!
  5. I need to do a simple query retrieving the value from a particular column of the database...ie SELECT myColumn FROM myTable WHERE user_id = 100 But - the "myColumn" can vary and cant be hardcoded, so i'm passing the column name as a nvarchar parameter. exec('select ' + @colname + ' FROM myTable where user_id = 100') But...i then need to do something with that value that gets returned. How do i get hold of it? I cant seem to declare another variable and set it when using the "exec". Cheers. van
  6. cheers for the help! I've stuck to the slightly more complex dynamic datagrid because it gives me more flexibility - but I might try this one out later when i have a bit more time on my hands... so thanks :)
  7. Has anyone got any ideas on how I can create the following display...? (NB: am giving an example of the data being displayed...) It's a simple 2 dimensional grid, with book names along the left and book shop names along the top. Then each cell in the grid contains a checkbox which is ticked if the book is supplied by that shop. (many books to many shops!) To top it all off, the book names and shops names need to be pulled out of a database and therefore the display needs to be dynamically created. I'm currently playing around with the datagrid control but it's looking tricky and i was wondering if anyone knows of a better way forward?? Cheers all. Van
  8. Ummm, no. The web site files are all in a random folder on the C drive, say C://MyWebsite Then there are some 'smartnav' looking files in C://MyWebsite/aspnet_client/system_web/1_03705_0/smartnav.js and a few others There's also another folder called "1_0_3705_288" I am *entirely* confused by all of this. I have managed to come up with a really dirty fix for the time being.... Help is much appreciated!
  9. I've got smart nav set to true. But the page wont even load. It tries to send me to a file/folder called IESmartNav1 help?? Do i have a missing file, and where can i get it from? Google just isnt helping... cheers. van.
  10. I'm attempting to get the site to have valid HTML - this is causing much grief due to several reasons (most of which arent .net related so i wont ask about them here) The one that *is* related is that the built in .net controls, eg an image button is writing out html with attributes which are not accepted by the HTML validator (http://validator.w3.org). My code reads: <asp:imagebutton id="btnLogin" onclick="doLogin" tabIndex="3" Runat="server" imageurl="enterButton.gif" width="45" height="18" EnableViewState="False"></asp:imagebutton> The outputted HTML is: <input type="image" name="btnLogin" id="btnLogin" tabindex="3" src="enterButton.gif" border="0" style="height:18px;width:45px;" /> Apparently there is no "border" attribute of the INPUT tag. Is there a way to stop this????
  11. BUT HOW?!?!?! I'm having to get rid of as much viewstate as possible to increase efficiency etc (see previous thread http://www.xtremedotnettalk.com/t80287.html for reasons) I'm just working through page and have managed to happily switch off hte viewstate for the textboxes on the page and it still knows what the user's input is. However, I have a radio grid control external to the page (since it gets used by several other pages in various guises). And this is refusing to keep the user input with viewstate off. I have another control list that does 'remember' the user's input but I think this is because it keeps an input hidden value using javascript to add the user's changes and this is what is picked up Tis awkward to copy code in, but will be happy to do so if need be. I'm just hoping there's something simple I've missed that someone can point out before i spend time pasting code here.... cheers. van.
  12. Thanks! cheers for all the replies - it has helped confirm what I have suspected all along - damn that viewstate! Our server is holding up fine - it's not being pushed at all! So new servers would be a waste of time ;-) But we've decided to crack down on the viewstate and change the site navigation to get rid of page refreshes when it's not really required (eg on save). Once again, thanks. Really appreciate the time you all took to reply :)
  13. HELP! We've been having serious issue with our site. It seems that users on poor connections (usually when there are several going on out the same conn) really cant use our site! We cant quite work out the reason, but the most probably cause is that the pages are just too heavy due to the viewstate. Unfortunately, most pages require user input but I've disabled viewstate for any 'static' ones. It just isnt enough. So the boss is asking about switching back from asp.net to good ole fashioned ASP. Can anyone think of a better solution than having to rewrite the whole site? Or do you agree that this is our best option?? Cheers, van
  14. Forgot to mention that it's a secure site (https) - which i'm guessing could have something to do with it??!?! but I still dont know how to turn caching back on.
  15. Not sure which forum this belongs in but... Our website is not caching at all and I cant for the life of me work out why. I've checked the IIS for HTTP headers I've checked the web.config - just incase! I've checked the pages themselves.....there's one occurence of an "expires" meta but removing it makes no difference. Can anyone point me in the right direction so that i can get the pages caching again?? cheers folks. van.
  16. yes, misintepretted - probably my fault! Right, there is only one button. It has code (which obviously runs the search). Originally there was one textbox - which gets a mention in the code as it's an input for the search. I've added a new textbox on the front end, which doesnt get mentioned in the code. It's this tbx that miraculously gets things working. hope that makes sense....it doesnt to me!
  17. It does? Forgive me for being slow (if I am) but that article just describes how a button works....doesnt it?
  18. nope - not a dickie bird..... Through trial and error I have come up with a solution that I dont understand, since it is entirely bizarre - I believe there may be magic involved Bascially, I've cut and paste one of the textboxes from the login page (which works) onto the search page (which doesnt). I havent done anything apart from that - it's just a textbox sitting on the aspx and not even mentioned on the code side - but it makes the return key work!!!! If you make the textbox invisible, it doesnt work again! odd. very odd. So for now, i've got an extra textbox sitting at the bottom of the page - I've disabled it, and hopefully users wont get too confused by it. Can anyone can tell me a proper solution though?
  19. Not sure if this is a asp problem or an html one, but here goes. I have a simple enough search page containing a text box for keywords and a drop down list of categories to choose. Obviously there is a "submit" button. Now when the user gets to the page, they type in some keywords and chances are they will hit 'enter' on the keyboard. But instead of submitting the search, this simply refreshes the page.... another page on the site (the login page) does submit on 'enter' but there is *no* difference! the controls are: <asp:TextBox ID="tbxKeywords" Runat="server"></asp:TextBox> <asp:DropDownList ID="ddlCategory2" Runat="server" CssClass="inputSelectBox"></asp:DropDownList> <asp:Button ID="btnStartSearch" Runat="server" Text="Start Search" OnClick="StartSearch_Click"></asp:Button> [/code] as always, thanks for listening ;-)
  20. global variables - doh! sorry for wasting your time folks.... PS. Why wouldnt it let me delete the post ??
  21. I'm having monday morning mental block - can someone just help clear something up for me? I've got a two files. One file contains the datagrid to display items. The other file(class) contains the calculation engine, for rating each item depending on certain criteria. This calc Engine function returns a DataTable of the ratings. But I want to return another variable as well as this datatable. So how do i do it? Am I making sense? THere must be an easy way but my brain cant quite get there this morning. cheers in advance....
  22. Didnt go through MMC (couldnt find the appropriate snap-in) - but did get there through Control Panel > Admin Tools > Local Security Policy. But that particular policy (idle time) is currently set to 15minutes. And it definitely takes much longer before we're allowed back in. But thanks for trying - anyone else got any ideas? :)
  23. Not sure this belongs in this thread (or even at this forum!) - so apologies if I'm wrong! We connect to our server using Remote Desktop. However, we are currently experiencing connection problems (to the internet in general) and therefore keep losing our remote DT connection. BUT if you then try to log in again, it wont let you because it *think* the connection is still open and you have to wait for it to timeout (apparently 3 hours ish!). Does anyone know how to change this timeout time? Waiting 3 hours to get back onto the server isnt exactly workable! cheers, van.
  24. Since this industry & general interest area is somewhat dominated by the men/boys/lads/more-gormless-species - I was just curious to find out if there were any geeking girls on here?? :) of course, i should warn you that the boys may not be able to control themselves when they find out women are about ;-)
  25. ok, if writing music on the BBC counts, then i was about 9.... But i only started programming properly on my degree course in Computer Science. I didnt even have a computer when I applied for the degree :) I only chose it cos i figured it would be something I could do. But then, I do this programming lark cos it gets me money - not for the love of all things technical like most people in here!
×
×
  • Create New...