Jump to content
Xtreme .Net Talk

davearia

Avatar/Signature
  • Posts

    185
  • Joined

  • Last visited

Everything posted by davearia

  1. No problem I've zipped up the project for you, it's been scanned for viruses so it's safe. :D Thanks, Dave. :D WebPigJawSuzzle.zip
  2. Hi all, I wrote a desktop application recently. The database was SQL Server, basically I had o form that was populated by the results of my dataset. I was a jigsaw daatabase and the form would show the name of the jigsaw, how many pieces, who painted it etc. Also I had a picturebox that displayed a picture of the jigsaw which retrieved from database via this code: Dim arrPicture() As Byte = CType(ds.Tables(0).Rows(lnRowNumber)("Picture"), Byte()) Dim ms As New MemoryStream(arrPicture) imgPigJaw.Image = Image.FromStream(ms) Having successfully acheived this project I have now decided to start an ASP.NET version of the same project. I have used an image control in place of the picturebox control. But the above code does not work at all. Firstly with imgPigJaw.Image I get the warning Also at Image.FromStream(ms) I get I have played around a little hoping to wing it, but I can't find a ASP.NET alternative to convert my memory stream back to an image. Please help!! Thanks, Dave. :D
  3. It seems that closing a memory stream explictly i.e. ms.Close() loses the image. I took all instances of, ms.Close(), and it's fine.
  4. P.S. I think my problem lies with the System.Runtime.InteropServices.ExternalException if this helps
  5. Hi All, I have wrote this database desktop application (using SQL Server 2000), that stores jigsawpuzzle details into a database. 95% of it works perfectly but I have one or two bugs that I am really keen to weed out but I am not too sure of how to do this. I have zipped up my code as it is too large to paste in here. I scanned it for viruses before I uploaded it and it is clean. I will try to explain the main problem as best I can. When the application fires up it fills a dataset and the contents of the dataset populates the main form, so you have the title of the jigsaw, how many pieces, price etc in the form along with a picture of the jigsaw stored in a picturebox. This works fine. The user can add new jigsaws by pressing the create new record button. Whether or not they supply a picture the insert works fine as there is a default picture to use just in case. This works fine. The user can delete any record. This works fine. This were things go a little wrong. If say for example the user wants to alter the title of the jigsaw but leave everything else as it was (including the picture) and press the update button. The update fails,complaining that there was no picture supplied in the update. If I did exactly the same as before but this time double click on the picture box and locate in the dialog box the picture already populating the picturebox, the update works fine. If I have confused you, I am sorry. Basically the dataset fills all the form including the picturebox, however when I try to update the record, the image in the picturebox seems to get lost somehow, unless I reload from the dialog box. I hope this makes sense, if it does please help me if you know what is going on. I have added a screenshot of the dubugger running whilst the above mentioned error occured to the zip file, it might be helpful. Thanks, Dave. :D PigJawSuzzleSP.zip
  6. Thanks for that coldfusion244. Unfortunately it does exactly the same. Up to now the only way to the tab order I want is to create the forms components in the order you wish them to tab in. There must be a way of doing it other than that though? Thanks again, Dave. :D
  7. I have a web page with 3 textboxes. I want them to tab from the top one to the middle and then to the bottom one. I have tried acheiving this two ways. Firstly in the properties pane I set the tab index to 0 for the first, 1 for the second and 2 for the last textbox. When I run the code the focus starts on the first textbox then it jumps to the address box of internet explorer itself and then to the third textbox and finally to second textbox. Not quite what I had in mind. Secondly I tried putting this code in the Page_Load: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TxtName.TabIndex = 0 TxtEmail.TabIndex = 1 txtMessage.TabIndex = 2 Dim strScript As String strScript = "<script language=javascript> document.all('TxtName').focus() </script>" RegisterStartupScript("focus", strScript) End Sub The results were the same as the first approach. I don't understand why this is happening. Has anyone got any ideas please? Thanks, Dave. :D
  8. Here is how I managed it, this goes right at the start of your <head> tag: <SCRIPT LANGUAGE="javascript"> if (document.all) { document.onkeydown = function () { var key_enter= 13; if (key_enter==event.keyCode) { document.getElementById('button1').click() } } } </SCRIPT>
  9. Hi All, I am trying to get an ASP.NET form to submit data on the form by pressing the enter key as opposed to the mouse being used to the press the button on the screen. From what I have found on this subject it seems as though I will have to write some javascript that will provide client script code to monitor key strokes. But I am struggling in dealing with this. Can somebody please give me some help here? Thanks, Dave. :D
×
×
  • Create New...