|
Hi,
Please let me know how can i use UrlDownloadToFile() in c# .....
|
|
|
|
|
IS it a .NET method ? If not, then perhaps you need to use p/invoke. Either way, you don't say what you want to use it for, or why you can't google it for yourself.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
this is the customer class(created by XSD) which i use to create the customer object at client
and pass to web service.
public partial class Customer {
private System.DateTime dATEOFBIRTHField;
private string cUSTEMAILField;
[System.Xml.Serialization.XmlAttributeAttribute()]
public System.DateTime DATEOFBIRTH {
get {
return this.dATEOFBIRTHField;
}
set {
this.dATEOFBIRTHField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public string CUSTEMAIL {
get {
return this.cUSTEMAILField;
}
set {
this.cUSTEMAILField = value;
}
}
}
when i set the date of the customer object
customer.DATEOFBIRTH = DateTime.Today;
and pass it to web service by calling it's method at client side the time is
automatically set to "01/01/0001" . any suggestions why?
|
|
|
|
|
Hi,
the DateTime.Today property returns a value like
"03/16/09 12:00:00 AM" whereas your method's argument might need only the date or time.....
Check this and if you need to pass anyone modify your code accordingly....
Have a Happy Coding.....
|
|
|
|
|
I got this error, And here is my code . Thanks
case 64:
if (GetFunction() == true)
{
if (GetStatus() == false)
{
FunctionError();
}
else
{
Reset();
goto case 65;
}
}
|
|
|
|
|
The goto is inside the brackets. You need a break after the if, or after FunctionError()
using goto in a case statement is so ugly. THe C# team are morons for requiring us to do this. I never do it, no matter what.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Do you have any recommendations for this case ?
|
|
|
|
|
How about moving the code inside case 65 into a function and calling that from both places?
|
|
|
|
|
Yes, that's what I would do.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
because i have like 100 cases like that and i prefer not make a case into a function
|
|
|
|
|
dec82 wrote: i prefer not make a case into a function
May I know why?
|
|
|
|
|
dec82 wrote: i prefer not make a case into a function
OK, you're really doing it the wrong way then. You're making a single monolithic method that does everything instead of breaking up the code into FAR more manageable, supportable, and extendable pieces. I'm afraid if you were working for me, I'd have to fire you for doing that. No joke...
I'd probably have to question the validity of using a Switch with 100 cases in it too. But, I say that without knowing anything about what your app does of its data model. If you were using a switch on an integer value, I'd probably look into using delegates stacked in an array or hashtable to shorten up the code and increase its performance. You know, using the switch value as an index into an array? But, like I said, it's only a thought based on no knowledge of what your code is doing or its requirements.
|
|
|
|
|
Well, if you're determined to write bad code, why are you posting about it here ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Actually break; cause the switch to exit and continue with the codoe afterwards.
Leaving it and not writing anything, but simply adding other case will automatically cause the switch to move on and execute all code until the next break;
Thus if you have somethng like this:
switch(number)
case 1:
break;
case 2:
case 3:
break;
case 4:
break; the program will do the exact same for 2 and 3.
If you don't want it to do anything different for 2, you might as well leave that case empty, so it immediately goes to the next code before the break;
|
|
|
|
|
i tried this......
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this is the transperant colors.....once i put this its become totaly transparent....i don't want like that...i want like vista aero.....
even when i change the colour of this red...63....etc become another colours....
is there a way to add opercity function only to background ......???
something like (this.BackColor or backImage as opercity 0.90.... )
A S E L A
|
|
|
|
|
S K Y wrote: System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
Wow - that's kind of ridiculous. Why all the casting ?
S K Y wrote: this is the transperant colors.....once i put this its become totaly transparent....i don't want like that...i want like vista aero.....
What are you talking about ? This is a grey, it's not transparent at all. Do you mean it's the mask color ?
S K Y wrote: is there a way to add opercity function only to background ......???
Not really, no. You'd need to use an opacity mask, which I believe is supported, or you'd have to write code to create one. An opacity mask is where you have another bitmap where each matching pixel tells you the opacity of the same pixel on the main image.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i want to make clear what u r tell...
r u telling to creat using code plane image and sent the opercity of that image. after that i should add that image as background image as my form....am i correct...???
A S E L A
|
|
|
|
|
S K Y wrote: is there a way to add opercity function only to background ......???
No.
But you can separate the background from the foreground, and draw each independently from the other, setting the alpha channel for the background to something lower than 1.0, while drawing the foreground with an alpha channel value of 1.0. However, that's not like Aero. Aero does the entire panel at the same alpha value.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
do u have any link discribing more about this or...how should i search....i mean search as???
A S E L A
|
|
|
|
|
Think about it - if you want to draw a control yourself, what do you need to do? You need to override the functionality to draw the control.
And yes, you need to search - I recommend google.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi all...
I've GridView that contains around 10000 records. and I want to disable JavaScript doPostBack (Sorting and pageing)
I found many articles but I don't know who is the best
what is the best way to make it available for SEO?
thanks...
|
|
|
|
|
Feddo04 wrote: I've GridView that contains around 10000 records. and I want to disable JavaScript doPostBack (Sorting and pageing)
With so much data is disabling paging really a good idea?
Feddo04 wrote: I found many articles but I don't know who is the best
Since you've not told us what articles you've found we can't really comment on them. I suggest trying out what they say and seeing what happens. Experimentation is an excellent form of learning.
Feddo04 wrote: what is the best way to make it available for SEO?
SEO? Search Engine Optimisation?
Allow search engines to find it
|
|
|
|
|
Hi Colin!
thanks for reply...
I think you didn't got me.
Ok....let me explain to you again.
of course I want to enable paging and sorting...("Who will put 10000 records without paging???!!!")
what I mean is the standard paging GridView is a Java Script. and then it'll not recognized by Google search or other search engine(SEO ("Search Engine Optimisation"))
So how to use GridView with a custom Paging ("without Java Script doPostBack") that what I didn't use it before.
Thank you...
|
|
|
|
|
Feddo04 wrote: I think you didn't got me.
That's why I was questioning what you appeared to be doing.
Feddo04 wrote: So how to use GridView with a custom Paging ("without Java Script doPostBack") that what I didn't use it before
Don't use a GridView. Create your own version that does what you want.
I tend to end up using repeater controls because they are so much easier to work with and I actually know what it is doing.
|
|
|
|
|
Hi!!
sorry for late..
I used Repeater control and it's working fine...(^^)
thank you so much....
|
|
|
|