Search Results

Search found 3 results on 1 pages for 'niike2'.

Page 1/1 | 1 

  • Set focus on textbox after postback.

    - by Niike2
    I have a search page with 3 TextBoxes that users can filter a search with. I have put the focus on the TextBox that contains text. If more than one contains text just focus on last TextBox. private void SetFocusOnTextBox(ControlCollection ctrlCollection) { foreach (Control ctrl in ctrlCollection) { if (ctrl.GetType() == typeof(TextBox)) { if (((TextBox)ctrl).Text != string.Empty) { SetFocus(ctrl); } } } } After the code runs and a user searches, the focus comes to the beginning of the TextBox, not the end where it would be presumed. How to put insert marked at the end of that TextBox?

    Read the article

  • How to get previous day using datetime.

    - by Niike2
    I want to set a DateTime property to previous day at 00:00:00. I don't know why DateTime.AddDays(-1) isn't working. Or why DateTime.AddTicks(-1) isn't working. First should this work? I have 2 objects. Each object have DateTime fields ValidFrom, ValidTo. First i save an object with ValidTo using the application setting MaxDate (SQL-server maxdate 9999-12-12). Then when I save a new object and that object ValidFrom is within the first objects ValidFrom - ValidTo timespan I want to change first objects ValidTo datetime to previous day of new objects ValidTo datetime.

    Read the article

  • Copy a Table's data from a Stored Procedure

    - by Niike2
    I am learning how to use SQL and Stored Procedures. I know the syntax is incorrect: Copy data from one table into another table on another Database with a Stored Procedure. The problem is I don't know what table or what database to copy to. I want it to use parameters and not specify the columns specifically. I have 2 Databases (Master_db and Master_copy) and the same table structure on each DB. I want to quickly select a table in Master_db and copy that table's data into Master_copy table with same name. I have come up with something like this: USE Master_DB CREATE PROCEDURE TransferData DEFINE @tableFrom, @tableTo, @databaseTo; INSERT INTO @databaseTo.dbo.@databaseTo SELECT * FROM Master_DB.dbo.@tableFrom GO;

    Read the article

1