I have a source file with bunch of text in it. There is a function there, called GetName("Some name"). I need to scan the file for that function and get all the names it tries to load.
So for example, GetName("Jon") should return "Jon" to me. I need to write a regex for that. The regex needs to be simple and not try to do any sort of validation. So GetName("123 lalala") is ok. I dont need to check if the name is a string and all that. I am just interested in whatever is between the quotations inside the GetName() function. Please help.
thank you, I tested it in expression, and it works great, but with little problem thoough.
Say I have this text: GetName("Igor")
the expression would return "Igor", which is good
but If I have GetName("Igor", the expression will also return "Igor", eventhough the last bracket is missing. I tried sticking \) in the expression in a couple of places, but produced an erronous expression.
I created a bound DatagridView and added an unbound DataGridViewComboBoxColumn and for each rows in the datagrid I add items to cell of the unbound column. What I find strange is that I see items count greater than zero and the values are there in each of the cells looking at the datagridview through the debugger but they don't show up for the user. I see the arrow down but no values are shown.
Not sure maybe I forgot some setting for the values to show ?
I have a windows application with a hosted web browser control, and need help regarding an issue:
The simple details:
Is it possible to have a hyperlink in a web browser control (within aforementioned windows application) output the hyperlink as text to the windows application it is hosted in without processing the link?
i.e. instead of http://www.microsoft.com/Any_Article.pdf opening a PDF reader, it outputs the html as a string to a messagebox, without opening the PDF reader program.
The in-depth details:
I have a tabControl with an InfoPath form control (Microsoft.Office.InfoPath.FormControl) on tabPage1 and a webBrowser control on tabPage2. I can programatically open any infopath *.xml form using C# (including not letting the form open as read-only) or fill out a new form from a *.xsn form template, and in the browser I can navigate (using custom buttons) our sharepoint site which hosts the xml forms. The problem is that IE6 opens the *.xml forms using Mircosoft Office InfoPath, and in my hosted application, I'd like the string of the link returned so I can open it within the form control, without (another) InfoPath starting outside of my app. Maybe, I should force the user environment to use a different program to open an *.xml file, a program that I'd write, that somehow redirected that link as a string back into the original windows app???
Well, you can get the document of the web borwser using the Webbroser.Document property. Cancel the navigation, get the URL, now either send a webRequest yourself and get the webresponse as a stream, or use the WebBorwser.Document mentioned above.
I've been busy with other things, and just yesterday got around to doing what you suggested. I tried searching the statustext of the link just clicked, and stopping it immediately if it matches a desired string. I put something like this:
if (webbrowser1.statustext ends with ".doc ") /*not what I actually have, but logically similar*/
MessageBox.Show("This shouldn't open MS Word after you click 'OK'");
But after you click 'OK,' MS Word (the full windows MS Word application) opens the document listed in the link that was clicked, and not in the hosted form control within he custom application I'm developing; programatically, though, I am able to open documents (local and networked) in the hosted form control with ease:i.e. formControl1.Open("C:\test.doc"). I think I must be searching the wrong string? maybe telling the wrong thing to stop???
I did some more searching online, and the closest thing that I can find is a tutorial about using a button, an ActiveX control, and preventing the OS from opening Word, but opening it in your custom ActiveX control. This is similar to what I'm doing, but instead of the button, I'm using a hosted web page (browsing a sharepoint website hosted within our domain) and I'm not using ActiveX. (Here is that link: http://support.microsoft.com/kb/304662)
Thanks for any info you can offer.
If this is still unclear, I'll be more than glad to explain it better.
It's about relationship, not performance. You should get the relationship right. Inheritance describes that B is an A, but aggregation describes that B has an A. For example, a car is a vehicle, but a car has (is not) an engine.
Last Visit: 31-Dec-99 18:00 Last Update: 27-Sep-22 23:05