- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 6
- Posts with Downvotes
- 6
- Downvoting Members
- 1
I tried [CODE]If (checkedListBox1.SelectedItem.ToString() == "Others") { //do something }[/CODE] but it's not working the way I wanted to.. Whenever the 'Others' item is checked, the code executes but if I tried to uncheck it, it still execute the code as if it runs when that item is selected checked … |
|
I can clear the content of the datagridview by clearing the dataset [CODE]ds.Clear();[/CODE] Then reset the datasource [CODE]datagridview.datasource = ds.Tables[0];[/CODE] Now I will do a select statement that has different columns from the current datagridview. What happens is, the column from the previous datasource is still intact. As if the … |
|
how to do this? I only know how to set the error [CODE]errorprovider.seterror(textbox, "message);[/CODE] remove the error [CODE]error.provider.seterror(textbox, "");[/CODE] But instead of just removing the error, I want to display something like a check mark. |
|
I have a form that is being validated using PHP server side scripting. To show multiple errors, I store it in an array and used foreach to loop through the values and echo it for dislay. I thought i'm finished using PHP validation but I noticed that everytime I submit … |
|
I'm using javascript for my client validation and I would like this to work the way I wanted to. I have three textboxes for last name, middle name and firstname. All the fields are mandatory and if the form is submitted there would be an error to display below the … |
|
I know I am doing this right but it just doesn't work. The condition for radiobutton that if it's not checked then an alert should display. But it won't work! [CODE]<script> function valid() { var element = document.forms["form"]["gender"]; var check = false; for(i=0;i<=element.length;i++) { if(element[i].checked) { check = true; break; … |
|
I have table B that has reference to table A. I need to insert value to table B's foreign key. How to do it using PHP? Do I need to use mysql_insert_id()? |
|
I don't what is wrong but there's an error [B]Error: Incorrect date value: '' for column 'DateBirth' at row 1[/B] I searched for answers but there seems nothing wrong with my code. I used date as datatype for date of birth. my php script. [CODE] <?php $m = $_POST["month"]; $d … |
|
I'm having troubles with the website I'm making. When zooming out, the navigation bar's contact us link is going to the bottom. Each link is set to specific width so I can make it full horizontal but it seems complicated to specify width. The content which is 800px at size … |
|
know that building webpages should be built with something like "master pages" wherein when you go to another page the headers, navigations and footers would not load(same), only the content. How could I do this using only XHTML? I'm just doing this in notepad. |
|
I'm having a hard time validating a checkbox. How to do it? This is my checkboxes input [CODE] <input type="checkbox" name="topic[]" value="HTML"/>HTML<br/> <input type="checkbox" name="topic[]" value="XHTML"/>XHTML<br/> <input type="checkbox" name="topic[]" value="CSS"/>CSS<br/> <input type="checkbox" name="topic[]" value="JavaScript"/>JavaScript<br/> <input type="checkbox" name="topic[]" value="XML"/>XML<br/> <input type="checkbox" name="topic[]" value="PHP"/>PHP<br/> [/CODE] I would like to check whether the … |
|
How could I validate a checkbox and radiobutton input using PHP? I wish to display a message if there's no selected value from checkbox or radiobutton. I tried this for my checkbox. [CODE]$check = $_POST["checkbox"]; if(empty($check)) { echo "You need to select at least one from the checkboxes"; } [/CODE] … |
|
I know it's a good way to catch an exception but why not just make it into a simple if..else statement and run a block of codes then used die to stop the code following it from executing or echo to enable the scripts following it from executing. What's the … |
|
I'm trying to open a txt file that doesn't exist just to display an error but it doesn't! I already modified my php.ini [QUOTE] error_reporting = E_ALL | E_STRICT display_errors = On html_errors = On [/QUOTE] but still doesn't work. I haven't experience errors since I used PHP! It just … |
|
I'm having a hard time to send a message to a certain e-mail account. I read that I should setup the PHP.INI at line where SMTP is located, which the default value is localhost. If the SMTP is to the computer itself which is 127.0.0.1 or localhost then the mail … |
|
Today, i'm working with base tag elements and I find base href to be very useful. I'm having a hard time to set a source for an image tag because of the specified link in base href. I tried to set an image that is located from a folder (background-image:url('my … |
|
I know that I can set it up in the property window but I need to do it in code. How? |
|
I'm having a hard time to return a string value. I usually do this by passing an int, which works just fine. Now, I need to pass a string but couldn't. Is this possible? Or int is only type that SQL can return? |
|
I got an error saying "There is already an open DataReader associated with this Command which must be closed first". I have only used datareader once while using the same connection for my dataset. Would that make some conflict? Need help. |
|
I need to have a watermark on both of my form using this [CODE] public static class TextBoxWatermarkExtensionMethod { private const uint ECM_FIRST = 0x1500; private const uint EM_SETCUEBANNER = ECM_FIRST + 1; [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)] private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, uint wParam, … |
|
I have a column in my table that is named 'startDateTime' and 'endDateTime'. I need to select all the rows where current time stamp is in between the startdatetime and enddatetime. Note that the datatype is smalldatetime. How to do this? |
|
I have three forms. All forms are shown and I have a button on the third form. The button should close all the forms including the form where the button was created. Application.Exit() is not suitable for this because I don't want the application to exit including the forms that … |
|
I made a project in Visual Studio 2008 that is consist of three forms named 'Main Menu', 'First Menu' and 'Second Menu'. My main menu has a datagridview that is being populated by a dataset. [CODE]datagridview.DataSource = ds.Tables[0];[/CODE] My Main Menu form has a button that will show First Menu … |
|
I'm having a memory exception because I only read my table's image column without specifying that it's a byte. How can I do this? [CODE] con.Open(); SqlDataReader rdr = cmd.ExecuteReader(); if (rdr.HasRows) { while (rdr.Read()) { FileStream fs = new FileStream("image.bmp", FileMode.Create); byte[] picbyte = (byte[])rdr["userimage"]; fs.Write(picbyte, 0, picbyte.Length); displaypb.Image … |
|
My form1 has a datagridview that is being populated by a dataset. I need to get the row's values selected on the datagridview to another form, which is form2 that is consist of textboxes. I am quite confused whether to pass the dataset to form2 or use a datareader to … |
|
I used to fill a listview with dataset that is set to details view. Now, I need to fill the listview with images and by that I believed that I'd set the view to large icons. How to do this? this is how I feel the listview [CODE] foreach (DataRow … |
|
I have two combobox, which is 'names' and 'types' and it's being populated by a dataset. It contains an additional item "-- ALL --" to indicate that all items of a particular field are being shown. I have an SQL select statement to filter the records according to the selected … |
|
How to select records with today's event? I have a column that is set to smalldatetime. I need to select those that have a row of today's event. |
|
There's an error saying that the combobox is already b, inded to a datasource, thus cannot add new items. This is how I populate my combobox [CODE] cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_distinctevent"; cmd.Connection = con; da = new SqlDataAdapter(); da.SelectCommand = cmd; ds = new … |