Jump to content
Xtreme .Net Talk

dinoboy

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by dinoboy

  1. The page can only contain one visible server-side form. So if you can put the Google form outside the main page form, then it should be working fine. Or you may add the onclick handler to the submit button to submit the specific form. In that case you should also add name or id attribute to that Google form. If that don't work, change that input type to 'button' instead of submit. <form name="googleForm" method="get" action="Search.aspx" target="_top"> ... <input type="submit" name="sa" value="Google Search" id="sbb" OnClick="document.forms['googleForm'].submit();"></input> ... Give it a try, it should work :)
  2. Depends what you want to do with that count next, you may also store the value in viewstate instead of session.
  3. Yes, this can be done with COUNT() function and GROUP BY statement SELECT COUNT(name) AS count, name FROM table GROUP BY name Where 'table' is name of the table and column 'name' is the name of the column you use.
  4. I had 512mb of ram and yeah, it's very slow. After I added extra 1gb of ram the performance boost was huge. But still there seems to be some problems with VS2005. After closing the program, sometimes the devenv.exe instance just keeps running. Have someone encountered the same problem?
  5. If you don't want to use the autogenerated columns then you can set the AutoGeneratedColumns property to false. To bind the ComboBox column, you set it's DataSourceID (you may use DataSource property too, if you want). For example something like that. YourComboBoxColumn.DataSource = db.GetDataSet("your_second_query").Tables(0)
  6. Do you want to update the existing row or add a new row? If you are trying to update, then you should use Dim dr As DataRow = dtCustomers.Rows[dtCustomers.EditItemIndex] which returns the row which you are editing Right now you are using Dim dr As DataRow = dtCustomers.NewRow which returns the newly added row and of course in case of update, cells have no values.
  7. If you manually create the DataGridView columns, then you can add a ComboBoxColumn and bind it to that query.
  8. dinoboy

    Can I

    If you want use both .NET 1.1 & 2.0 applications, you must have both versions installed. You then create a virtual directory under IIS (or with VS2005 you can use it's built-in server) and choose the appropriate .NET version. FYI you can't use VS2003 and VS2005 on the same project. Once VS2005 converts the project file to the new format, it cannot be used with VS2003.
  9. If you can/may change the database and the FK, then you should set the FK delete rule to cascade. Cascade means that when you want to delete/update the row in primary table then the rows are updated/deleted from the tables with foreign key too. In your case you should then delete only from table GridGroups and matched rows from GridTrans would deleted automaticly. Other option, if you can't change the FK rule... You don't say in your error with which table the integrity constraint violation appears? I mean there may be other tables with FK's to GridGroups table. If so, then you can't delete from GridGroups unless you first delete all matching rows from all other tables with relations.
  10. In addition, some browsers or other settings may disallow HTTP refferes. So even when the page shouldn't be accessible without a reffere, you should check if the refferer is set. I just had the same problem, because my Firefox didn't set refferer.
  11. dinoboy

    Can I

    Yes you can.
  12. But if you call just ? public MyAbstract() { }
  13. Finally I found what was wrong.... The problem wasn't related with the threading. It was caused by the lenght of the progress bar and it's values. When I assigned the value to 0, then it still showed one bar.
  14. Actually I don't start any new threads. Simply Asynchronous request is made and while it is making the request I want to display to the user a progress bar. And for updating it, I use System.Timers.Timer class, whcich automatically starts in a new thread.
  15. I am developing an application which makes the search request via the web service. Meanwhile the progress bar control is displayed to the user. Now, I am using a timer to update the progress bar. As far as I know, the System.Timer should start in the new thread... and here I am having a problem... Start the timer: this.timer.Interval = 100; this.timer.Elapsed += new System.Timers.ElapsedEventHandler(this.cbProgressBar_update); this.timer.Start(); And when timer elapsed, I want to update my progress bar. The progress bar owner is the main UI thread, but the event is raised in the timer thread. So I can't call in cpProgressBar_update method just this.progressBar.PerformStep(). Am I right? Should I use Invoke() methods in the raised event? I have tried different solutions I have thought about, but the results weren't what I had expected...
  16. For writing ASP.NET (or ASP to), its definitely better and convenient to use Visual Studio, because it has the proper IDE included and also help files. Dreamweaver's main purpose is not to write ASP code. It's my opinion.
  17. I am using HttpContext.Server.Execute() in iHttpHandler which activates the download process. And in that class, which is making the download I use Thread.Sleep(). My question is, that can I release that sleep time to system so that system can do other things on that time?
  18. Hey! I generate a realtime log about actions taken place on button click. I use Response.Write() and Response.Flush() methods. But my question is, that can I send the output to iframe which is located on the same page? Can I do it directly or I must generate a some kind of temporary page?
  19. Thanks for the replys. But I already found a solution. I saved the temporary stream to a temp fail and then read it again and got the length and then deleted the file. And it's working :)
  20. Hmm, it seems it don't help me. Because parameters have a values and not null. But still it is saying that.. :S There are some problem with while loop but I don't know which :confused:
  21. I did that in while loop and before the while, but no use, it told me again Inavalid parameter used. :( Hmm, maybe is there some problem with parameter nulling? or something :S
  22. public void OutputFile(string fileName, int maxThumbSize) { System.Drawing.Image g = System.Drawing.Image.FromFile(fileName); ImageFormat tFormat = g.RawFormat; Size tSize = this.genThumbSize((int) g.Width, (int) g.Height); Bitmap imgOutPut = new Bitmap(g, tSize.Width, tSize.Height); MemoryStream imgStream = new MemoryStream(); imgOutPut.Save(imgStream, tFormat); //imgOutPut.Dispose(); while(imgStream.Length>maxThumbSize) { this.thumbSize = this.thumbSize-5; Size s = this.genThumbSize(imgOutPut.Width, imgOutPut.Height); imgOutPut = new Bitmap(System.Drawing.Image.FromFile(fileName), s.Width, s.Height); imgOutPut.Save(imgStream, tFormat); } //imgOutPut.Palette = if(tFormat.Equals(System.Drawing.Imaging.ImageFormat.Gif)) Response.ContentType = "image/gif"; else if(tFormat.Equals(System.Drawing.Imaging.ImageFormat.Bmp)) Response.ContentType = "image/bmp"; else if(tFormat.Equals(System.Drawing.Imaging.ImageFormat.Jpeg)) Response.ContentType = "image/jpeg"; else if(tFormat.Equals(System.Drawing.Imaging.ImageFormat.Png)) Response.ContentType = "image/png"; imgOutPut.Save(this.Response.OutputStream, tFormat); } This line gives me the Invalid parameter imgOutPut = new Bitmap(System.Drawing.Image.FromFile(fileName), s.Width, s.Height); Wihtout the while loop, it's all ok, working just fine...
  23. Hi! I generate thumbnails dynamically. The function has two parameters - filename and maxfilesize. And while thumbnail size in butes is bigger than the maxfilesize, it make new thumbnail again, only a smaller one. And my problem is how I can check the thumbnail size? It tried to save it to stream and then I took its length and compared it with maxfilesize and do the while loop. But when I tried to make a new bitmap with a new size, in the loop, then it told me The invalid parameter used Are there any other solution or why it tells it?
×
×
  • Create New...