|
George_George wrote: Also, for an URL string which is not containing any characters to be escaped, how could you make a check?
Compare the string with the output of UrlEncode and see if its the same maybe?
|
|
|
|
|
Thanks leppie,
I have tested that for an escaped (encode) string, if we escape (encode) again, the string will be longer each time we encode.
So, even if the string is not the same, you still can not make conclusion whether the original string is encoded or not. Here is my code. Any ideas?
class Program
{
static void Main(string[] args)
{
string abc = HttpUtility.UrlEncode("http://abc def");
abc = HttpUtility.UrlEncode(abc);
abc = HttpUtility.UrlEncode(abc);
abc = HttpUtility.UrlEncode(abc);
abc = HttpUtility.UrlEncode(abc);
return;
}
}
regards,
George
|
|
|
|
|
Encode then decode, encoding several times wont detect anything!
|
|
|
|
|
Thanks leppie,
I am confused about your reply, do you answer to my original question item 3? If yes, your solution is?
Sorry my English is not good.
regards,
George
|
|
|
|
|
One solution could be to use regular expression and find the occurrence of &, % etc…
|
|
|
|
|
|
hii 4 all
How can i iterate over all the forms in my project?
it is not mdi application
i have tried application.openforms its not working!
|
|
|
|
|
If you create a new form, put it in a collection.
For example :
List forms = new List();
Form form1 = new Form();
forms.Add(form1);
You can iterate it in this collection.
|
|
|
|
|
but , i want to get all of the forms in the project without creating object first,
i tried
foreach (Form frm in Application.OpenForms)
but it just returns the opend forms only!
|
|
|
|
|
When you say "get all of the forms in the project" do you mean all the forms in a Visual Studio project, or all of the forms in a running application? The latter will require using reflection.
only two letters away from being an asset
|
|
|
|
|
Hi, i'm new in developing with C#.net, antill now i've create simple application fo general porpose but now i'm going to crate an application to read and display shapefile produced by gis software such ESRI software.
I've downloaded the specification of shapefiles and i'm building reading API from my self, but i'd like to know if you know some examles, codes, or else that has been already developed.
I've found some library but i can't understand well the licence term and if i can resell my software that are using those library. Moreover i still don't know the right approach to develope in gis software, if you have any advise it's appriciate.
Thanks
Manuel
|
|
|
|
|
Can i create add in for outlook 2002 in VS2005
wasim khan
|
|
|
|
|
Sorry, i am not answering your problem , but can i know have you developed any addins in excel 2003 sp3 using .net 2008 or .net 2005 and deploy in any of client's computer
|
|
|
|
|
Thanx for ur kind reply i already created add in for Outlook2003 using Vs2005 VSTO but my problem is Outlook2002
wasim khan
|
|
|
|
|
Hello everybody,
i have a view that contain data from many tables.
i have added a field to a specific table, and when i make a run for that views,i Remarque that a column contain values for other column. it was similar to a push of columns but without the push of the column header
best regards
dghdfghdfghdfghdgh
|
|
|
|
|
I"m sorry, is there a question here ? Your next to useless header ( there is no SQL in your post ), makes me think whatever it is, if expressed lucidly, probably belongs in the SQL forum.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hello!
My windows mobile program uses the serial bt to get data from a device (bt slave). We open a com port to send and read data. This all works fine.
But the unaesthetic part and the thing I want to change is:
Each time I try to open the COM port the mobile displays the pin request for the device - sometimes also the whole pairing process for the device shows up.
Does anybody has experience or an idea how I could eliminate the pin request?
I'd like to finish the program as comfortable as possible.
Thanks for help!
Beat
|
|
|
|
|
I have managed to create the PDF programmatically by using 'Acrobat Distiller' printer and Word Application PrintOut method but when i open it using adobe ot gives me error 'it is either not a supported file type or because the file has been corrupted'.
Thanx in advance
|
|
|
|
|
I guess you've not really created a PDF at all then, have you ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
its showing a pdf but definitely there is a problem.This is how i created a pdf
<br />
string printerName = oWord.ActivePrinter;<br />
oWord.ActivePrinter = "Acrobat Distiller";<br />
oWord.PrintOut(ref missing, ref missing, ref missing, ref outputFile2, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);<br />
oWord.ActivePrinter = printerName;<br />
oWord.Documents.Close(ref missing, ref missing, ref missing);<br />
oWordDoc = null;<br />
//////where oWord is 'Word.Application'///////////
//////where oWordDoc is 'Word.Document'///////////
//////outputFile2 is a pdfpath////////////////////
///// object missing = System.Type.Missing///////
|
|
|
|
|
hi freind can any body tell me that how i can create addin for Outlook 2002 in VS2005 if yest then how
wasim khan
|
|
|
|
|
Hi all,
I want to store the contents changes of my windows controls in a database. Therefore I determined the name of the object in the control_enter_method and save the name and value as string. Later in the case of canceling the changes I want to reassign the stored values from database back to the controls.
How can I reference the control object by it's name (stored as string) ?
My idea was
object obj;
((TextBox)obj).Name = stored_obj_name;
((TextBox)obj).Text = stored_value;
but this does not work.
what's to do ?
Tnx in advance
Frank
|
|
|
|
|
If you control name, you can access Controls property of a Form class using an indexer that takes string as an input.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
just to put an example with Giorgi's reply
this.Controls["textBox1"].Text = "Hello World";
|
|
|
|
|
Hi Giorgi,
thanks for the reply.
Is that the right solution to get the index ?
I tried this
int index = this.Controls.IndexOf((TextBox)sender);
but get always index = -1;
Where is my fault ?
Tnx Frank
|
|
|
|