string sFull = "this the is test for the true";
string sToSearch = "the";
int iFirst = sFull.IndexOf(sToSearch);
int iSecond = sFull.IndexOf(sToSearch, iFirst + sToSearch.Length);
string sText = sFull.Substring(iFirst + sToSearch.Length, iSecond - iFirst -sToSearch.Length);
I have a form that can optionally display several MDI children forms. I have a toolbar that when clicked, I'd like to make the child visible and bring it to the front. If the child is already visible but not in the front, I'd like to bring it to the front. Finally, if the child is visible and in the front I would like to hide the child until the button is pressed again.
I have no problem showing/hiding or bringing the form to the front, but I don't know how to determine which form is on top. Any ideas on how to do this?
This is a feature I've seen with the picture control on VB, but could I do that with text boxes or buttons on C#?
I´m trying to change some properties of textboxes but I want to use iteration. For instance, I want to assign the for cycle counter's value to each textbox and display it. 1 for textbox1.text, 2 for textbox2.text and so on.
If anybody has another method to do this please tell me.
I have a custom control which encapsulates a dropdownlist and label.
when you select an item from the dropdownlist it should autopostback
and change the lable text. But postback (selectionchanged) event is
not working at all.
Here is my code.
private void buildControl(HtmlTextWriter output)
Table currencyConverterTable = new Table();
// add a label
// here I am adding a dropdownlist
dropdownlist currencySelector= new dropdownlist();
currencySelector.DataSource = mydatasource;
currencySelector.DataTextField = "CurrencyCode";
currencySelector.DataValueField = "id";
currencySelector.AutoPostBack = true;
currencySelector.SelectedIndexChanged += new
// add this dropdownlist to the table
// now render it
Seeking help with
(i) method/ c# code to remove every second item in a queue
I tried front.next = front.next.next but it this is removing only one second item just after the first but would like to remove every other second item/element through out the queue.
Is it possible to read a cookie that a website has created or write a cookie that the same website can use? I mean outside of the website itself? It's my own web site, by the way. I know the names and keys inside it and where it is stored already.
Last Visit: 31-Dec-99 18:00 Last Update: 13-Apr-21 7:05