1,576 Posted Topics
Re: For the while loop simply put in an integer that holds the number of ships still alive (3,2 or 1). While (shipsAlive >) 1 {} will keep your game looping and you simply decrease the number by one when a ship is destroyed. For the targets, add variables that indicate … | |
Re: If you are referencing the files by their folder and file name there can't be a clash so I'm not sure what the problem is. What exactly are you trying to do? | |
Re: In the global.asax file there is a session_end function which is called when the timeout period for the website is reached. You can use that to alter any session variables or to clear them out completely if a user has been inactive. | |
Re: Check out jQuery cycle. It is a jQuery library for slideshows with a variety of transitions. It is pretty easy to set up too. | |
Re: In this case I think you can also simply make the getGallons sub alter the text of lblGallons label (depending on where your getGallons sub is located). | |
Re: You have a couple of options to do this. Each step requires pulling the menu items out of the database of course but after that you can display the menu as a standard UL but with asp:Labels inside each <li> or use a literal control to output the html for … | |
Re: What are you trying to do here? You seem to be setting textboxes to values retrieved from a database and then immediately redirecting the user to another page. Whats the point in doing that? If you want to populate that data on another page there your should be doing the … | |
Re: If you want to direct to another page for displaying the results then you use the form to post the inputs to the next page (searchname.php as your form is currently set up) and that page then reads them out of the POST data and executes the retrieval from the … | |
Re: Are you looking for a coding solution or are you asking how to dock a window on a second screen (i.e. drag the 2nd form to the second screen and maximise it) - because it sounds like that is all that is required. | |
Re: Adding DISTINCT to the start (SELECT DISTINCT...) will make sure each row is only output once if the search critieria or the database table itself allow duplicates. | |
Re: Maybe you should read up on what exactly the function html_entity_decode does, that might answer your question ([http://www.w3schools.com/php/func_string_html_entity_decode.asp](http://www.w3schools.com/php/func_string_html_entity_decode.asp)) | |
Re: If only there was some kind of machine that could search the world for these kinds of things... oh wait. Did you google "free stock images"? I did and found: stock xchng, getty free images, turbo photo, stock vault and a pile of others. Maybe my sarcasmism is misplaced but, … | |
Re: To make one section of the page stay in place while the rest scrolls use position:fixed in the CSS.So, if you have a div or relevant container in the master page use the position:fixed on that. AJAX will let you update part of a page and should be of use … | |
Re: Confirm that the dataReader, or the dataTable, actually contains some rows. Does the price column really include the dollar sign and the space between the $ and the price? Also, is the radioButton set to autoPostBack=true? If not it is possible the code isn't getting called at all. | |
Re: Quality links with sites that have a higher page rank is the best method to use, particularly, as smith_warnes noted, if the link is in-bound. But you have no control over that so it definitely isn't a fast way to get page rank. Posting in forums and writing articles, blogs, … | |
Re: Some people have provided you with incorrect advice here. You can't just click on a .aspx file and open it in the browser, a web server is needed (like IIS). Your lecturer will know this hopefully or open it via Visual Studio first. | |
Re: To make it clearer for us you could have mentioned that the problem is that the textboxes don't get focus so you can't type in them. Tabbing also works to get into the textbox by the way but it still isn't very user friendly. The code works fine if I … | |
Re: If you add a connection string to the web.config and intend to use it, you access it with this: sqlConnection con = new sqlConnection(ConfigurationManager.ConnectionString["donationConnectionString"]); You will need to add System.Configuration to your using statements at the top of the class for this to work. The configurationManager will then go to … | |
Re: That error can sometimes appear if you have any files in the 2005 project that do not have file extensions. | |
Re: Hi, As a general rule we don't do your homework for you. If you have made a fair attempt at the question, show us how far you got and we'll nudge you in the right direction. For example, for your question, what have you tried or what do you think … | |
Re: Any server side code won't be visible in a website anyway so you're perfectly safe. | |
Re: Show us some code and then we can help, otherwise we're flying blind. Although, if you you debug your code and examine the data source after it has extracted the data from the database, (your dataReader, dataSet, etc) does it have rows of data in it? That will help you … | |
Re: You need to alter your filter so it includes multiple statements. I.e. "Brand='Samsung' AND brand = 'Nokia'". To do this you will need to collate which checkboxes are checked and build up a string that represents that and pass it into your RowFilter. private void filterView() { ArrayList filters = … | |
Re: Add this in the page_load method: btnSubmit.Attributes.Add("onclick","javascript:if(confirm('Are you sure?')== false) return false;"); And then code up your normal button_Click function. On clicking the button the script confirm option appears and if No is selected processing stops, else the server side button click function is called. | |
Re: Loop through the rows in the gridview individually, checking if each one requires an update to the database. If you need more specific advice post up what code you have done so we can get a better idea of what you need. | |
Re: You can use FTP to download the files to work on them. Once you're finished FTP them back to the site. Any downtime to a particular page or the site in general should be pretty minimal. As for the server and password the site administrator will need to give that … | |
Re: I haven't done anything like this myself but I think you will need a service running in the background that checks the current open TCP connections against your blacklist and shuts them down if they feature on it. Of course TCP connections appear as IP addresses so your blacklist will … | |
Re: Which table are you referring to exactly? The tblAcc, the Accounts table in the dataset or the database table? Because you have no code that will alter the last two. Your code to add a row to tblAcc looks right so how are you checking that tblAcc has no new … | |
Re: Which version of SQL Server are you trying to restore to? If it is of an older version of MS SQL than your source database you will see this error. If in doubt use SELECT @@VERSION on both to make sure they are the same. | |
Re: You are setting uname and emp_name outside of the while loop so they become set to the data from the first row of the dataset and they never change. This means that inside your while loop your SELECT and INSERT statements are always using the same values. Simply move the … | |
Re: Is your serial number column set to auto-increment? If yes, pass it null instead of zero. Once you have added parameters you do not need to add them again, simply change the value they hold: cmd.Parameters["@name"].Value = new_value_to_insert; That should get around the duplication error, if that is the problem … | |
Re: Change your SQL to have the % sign in front and behind the strKeyWord. This will make the search include anything before or after a 'D'(in your example), not just before like it is now. | |
Re: When you use new you create a blank version of the object in question (hence new). What records are you trying to clear? Most collections have a built in method to clear them of all current data. | |
Re: In that particular example they went to a lot of trouble to create an image map where they defined the regions each link would relate too. The page source makes a good example of how to do it yourself. Less accuracy in the borders would make the task a lot … | |
Re: Do you mean you get an error in the GetBindingSource function? What error messages do you get (and I mean the ones generated by VS, not your MsgBox messages that you have made). You mention other errors but you haven't referred to what causes them. Where/when do they appear? | |
![]() | Re: Place your 2 panels on the form and then in the properties pane set the location of each to be the same. They will then appear exactly on top of each other (not one inside the other) and you can alter the visibility of each as required. |
Re: Just give your function a name and call it like you normally would. | |
Re: Hi, 1) If the two radio buttons are for different options I would suggest you don't. The only time two radio buttons would match to the same column in the database is when they are Yes/No, On/Off types of combinations. To be honest, this question is really no different from … | |
Re: You have 9 columns listed in the SQL statement but ten inputs in the values section including the zero at the end. The zero has no matching column specified. | |
Re: If it is crashing at line 10 then there isn't any rows in the dataset. Going by your SQL statement I'm not surprised as it is incorrect. Your statement as it appears above will be executing as: Select * from fees where particulars='DataGridView1.Rows(0).Cells(1).Value' I strongly doubt you have any row … | |
Re: You are pretty close but you aren't setting num to the textbox value that is the upper limit so that needs to be fixed of course. After For x = 1 To num, include output = output & x.ToString & "." That'll give you the 1., 2., 3. you want … | |
Re: For future reference, CSS added to the page needs to be inside <style></style> tags in the head element or inside elements on the actual page (e.g. inside <div> or <span>, etc). Simply typing it in as text will make the browser render it on the page. It doesn't know any … | |
Re: Why do you want to log out the user just because they opened a new browser tab? Aren't they allowed to cruise the net AND be on your site? If you have an issue with users signing in with more than one account at the same time then you need … | |
Re: First question is who is your target market for the website? IE is still the main browser for people with more limited PC skills (they haven't even managed to download a better browser for example). If your target market includes such people (i.e. possibly older, less educated, etc) then maybe … | |
Re: So you want to add code in your button click that clicks if the particular radio button is checked and redirect as appropriate. if(RadioButton1.Checked) { // do something } else if (RadioButton2.Checked) { // do something else } Is that what you are after? | |
Re: What error are you getting? | |
Re: jquery has everything you need. Check out this link (http://api.jquery.com/jQuery.browser/) for the browser detection library and then the standard jQuery for how to switch a stylesheet. Google will show you tutorials on that easily enough. | |
Re: If you are using the same code above for your C# sharp project you will need to use If(form1.Visible == true)Then -- note the double == as this is the correct C# form to test for equivalence. Single equal signs set a variable and can't be used to as you … | |
I've been at this for hours - I am trying to display a barcode font in a label. Sounds simple but apparently isn't. I've added the font ttf to the project and added it to the UIAppFont array in the project p-list but the text appears normally (defaults to the … | |
Re: Although you wouldn't be following the spec I think 255 would be fine. I have never allowed email addresses longer than 80 characters in any of my databases and I have never had an issue. I'm guessing but I imagine 95% of emails are less than 30 characters. |
The End.