|
hi....
I am developing project using c# with asp.net 2005....
here I am using start date and end date....whenever inserting date into database(date format is dd/mm/yyyy 00:00:00)...whenever update (edit) the date I want date format mm/dd/yyyy without time...
anybody know please reply me.....
Rajendran.AL
|
|
|
|
|
I've done something like that it was something like objDatetime.ToString("T")
try it out
hope it helps
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Let's get this straight - you have a valid date in DD/MM/YYYY and you want to change it to MM/DD/YYYY? Why don't you manipulate the string directly?
As an aside, why do you rely on the database to interpret it as MM/DD/YYYY? YYYY-MM-DD is universally accepted and much better.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
Vikram A Punathambekar wrote: YYYY-MM-DD is universally accepted and much better
Right, it's ISO 8601 compliant.
Plus, I hope the data is being stored in a DateTime, not a string.
|
|
|
|
|
You can try this:CONVERT(varchar(10),date,120),I think this function can do that.
Always do you best,what you plant you will harvest
later!
|
|
|
|
|
Hi
Can you suggest a way to achieve SSO in domain using ASP.net and C#.
Reena.
|
|
|
|
|
hi
i have a backgroundWorker object in my form, and set WorkedReportProgress to true and write this code for some eventhandlers :
<code>private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
int i = 0;
while (i < 1000)
{
this.backgroundWorker1.ReportProgress(i); // not trigged
i++;
}
}
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
this.toolStripStatusLabel1.Text = e.ProgressPercentage.ToString();
}
</code>
when i trace my app in runTime, in while loop, i call backgroundWorker1.ReportProgress method to raise
backgroundWorker1_ProgressChanged, but it does not raise, where does my problem and how to solve it ?
thanks
|
|
|
|
|
haveu added the event handler like this
backgroundWorker1.ProgressChanged+= new EventHandler(backgroundWorker1_ProgressChanged)
I think this could be the problem
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
thanks
where i write your suggestion code ?
|
|
|
|
|
write it in the page_load method or the constructor
hope it helps
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
thanks
i write your code in Form1_Load :
this.backgroundWorker1.ProgressChanged += new EventHandler(this.backgroundWorker1_ProgressChanged);
but the follwoing error has shown me :
No overload for 'backgroundWorker1_ProgressChanged' matches delegate 'System.EventHandler'
|
|
|
|
|
ok try doing it in this sequence
type
1) this.backgroundWorker1.ProgressChanged+=
2) then as soon as u press the = key you'll see a tooltip
3) press tab twice
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
BackgroundWorker w = new BackgroundWorker();<br />
w.ProgressChanged += new ProgressChangedEventHandler(w_ProgressChanged);
ok now I've checked it on my system.
that's the code
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
thanks for reply
but my problem was not solved.
i call ProgressChanged event handler manually, and solve problem :
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)<br />
{ <br />
int i = 0;<br />
while (i < 1000)<br />
{<br />
this.backgroundWorker1_ProgressChanged(null, new ProgressChangedEventArgs(i,i));<br />
i++;<br />
}<br />
}
but why it does not raise ?
thanks
|
|
|
|
|
this.backgroundWorker1.ReportProgress(i);
you shuld be using this to report progress as this will raise the ProgressChanged event which will inturn invoke the method refered to by the delegate given at the top (when u did something like
w.ProgressChanged += new ProgressChangedEventHandler(w_ProgressChanged);
)
rest of the logic is upto u but tryin this
hdv212 wrote: this.backgroundWorker1_ProgressChanged(null, new ProgressChangedEventArgs(i,i));
is simply meaningless
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Do you have ProgressChanged event handler setup, e.g. backgroundWorker1.ProgressChanged += .... ?
Another thing to remember is that ReportProgress will call your handler asynchronously; it won't block the background thread.
|
|
|
|
|
hi all,
this may be a silly question but i'd like to know if there exists a solution or not.
the question is: i have 2 different applications (each contains just 1 form and both have their TopMost property set TRUE)
both work great (remain on top of all open applications) separately.
but if i start them one after another, the latter remains on top of all unless i don't click to the former on status bar.
i wonder if i am able to set priority between such forms ?
let's assume app1 and app2 and both have topmost property true.
but i'd like to have app1 that has higher priority than app2 or vice versa ?
thanks in advance.
bye.
MFA
|
|
|
|
|
ohh jeez that's a difficult one mate
I think u can't set any priority but may be there's some guru out there who can do such a thing but to me it looks quite difficult if not impossible
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Don't use TopMost, it's user hostile.
|
|
|
|
|
Hi! I'm making a program in C# but have some trouble.
I want to use marquee control, but .Net doesn't provide marquee control.
I've searched for that, but I found some commercial controls or broken download link to free control - "Marquee Label .Net Component 1.0" by Ning Zhao.
Is there anyone who has "Marquee Label .Net Component 1.0" or something like that?
Thank you for any help.
|
|
|
|
|
Hi,
you can use marque in aspx page.
Its working fine, you will get red line (error underline) but it will work.
<marquee>Hello World!</marquee><br />
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Sun Rays ou can use marque in aspx page.
Looks like OP is asking for windows applications.
|
|
|
|
|
Use a timer and move the label. It will look like a marquee.
|
|
|
|
|
|
Just make a custom control to do it for you. Not that tough.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|