|
Don't bother with that. It's ridiculous user fluff on the Web. Just say "Your session may have expired" or something. Don't go adding a bunch of hacked complexity to try and get browsers and HTTP to do things they were never designed to do just to supply users with perfect message, that is just foolishness.
led mike
|
|
|
|
|
|
Programmer in the Making wrote: I am wanting users to vote on the priority (emergency, high, med, low) of a request.
Who are these users? If they are the average monkey you may as well just use a random number generator.
led mike
|
|
|
|
|
|
Ok, that tells me nothing
led mike
|
|
|
|
|
|
Programmer in the Making wrote: an idea of what request we need to work on first when it comes to fixing our software.
So you are talking about a bug (issue) tracker system. I would never have known that from your original post.
Have you done a comprehensive study and concluded that none of the existing systems[^] have that feature?
led mike
|
|
|
|
|
I have some code I was (attempting) to optimise, and came across a weird problem...
I have a button, and 2 Calender Controls
Here's the code
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
string date = "2008/03/27 12:36:00 PM";<br />
<br />
int year = Convert.ToInt32(date.Substring(0, 4));<br />
int month = Convert.ToInt32(date.Substring(5, 2));<br />
int day = Convert.ToInt32(date.Substring(8, 2));<br />
int hour = Convert.ToInt32(date.Substring(11, 2));<br />
int minute = Convert.ToInt32(date.Substring(14, 2));<br />
<br />
<br />
<br />
DateTime dt1 = new DateTime(year, month, day);<br />
Calendar1.SelectedDate = dt1;<br />
<br />
DateTime dt2 = Convert.ToDateTime(date);<br />
Calendar2.SelectedDate = dt2;<br />
}<br />
Looks the same, correct?
That's what I thought...
The Problem - After the Button is clicked, the 1st Calender has it's date selected, and the second one doesn't...
Now, the thing is, if you change:
DateTime dt1 = new DateTime(year, month, day);
to
DateTime dt1 = new DateTime(year, month, day, hour, minute, 0);
then the first Calender "Breaks", and doesnt select the date...
Any suggestions as to why?
|
|
|
|
|
I would imagine that it has to do with the default date parsing and locale. Try changing your date declaration to 03/27/2008 12:36:00 PM or use the DateTime.Parse overload that allows you to specify the composition of your date string.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
No luck...
Neither
string date = "03/27/2008 12:36:00 PM";<br />
<br />
DateTime dt2 = Convert.ToDateTime(date);<br />
Calendar2.SelectedDate = dt2;
nor
string date = "2008/03/27 12:36:00 PM";
<br />
DateTime dt2 = DateTime.Parse(date);<br />
Calendar2.SelectedDate = dt2;<br />
select...
Any other suggestions?
|
|
|
|
|
hrmm... both worked for me in a prototype. Try:
string date = "03/27/2008 12:36:00 PM";
DateTime myDate = DateTime.Parse(date, "MM/dd/yyyy hh:mm:ss tt");
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
string date = "03/27/2008 12:36:00 PM";<br />
DateTime myDate = DateTime.Parse(date, "MM/dd/yyyy hh:mm:ss tt");
The best overloaded method match for 'System.DateTime.Parse(string, System.IFormatProvider)' has some invalid arguments
Argument '2': cannot convert from 'string' to 'System.IFormatProvider'
Might be because I'm using .NET 3...
|
|
|
|
|
Gah! Nope, the problem is not framework version, the problem is me working from memory and mixing languages up. Never try to answer a .NET date parsing question while writing an Oracle stored procedure that uses a date range.
My apologies. My bad.
Be sure to call the Date property of your date when setting the selected date. That appears to be the culprit. For example:
string date = "03/27/2008 12:36:00 PM"; DateTime myDate = DateTime.Parse(date); this.Calendar.SelectedDate = myDate.Date; this.Calendar.SelectedDayStyle.BackColor = System.Drawing.Color.Blue;
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Omg...
string date = "2008/03/17 12:36:00 PM";<br />
DateTime myDate = DateTime.Parse(date);<br />
this.Calendar1.SelectedDate = myDate;
compiles, but doesnt work, whilst
string date = "2008/03/17 12:36:00 PM";<br />
DateTime myDate = DateTime.Parse(date);<br />
this.Calendar1.SelectedDate = myDate.Date;
compiles and works...
Thanks alot
Update:
This is going STRAIGHT to Subtle Bugs...
|
|
|
|
|
My pleasure. I'm glad that its working. My apologies, again, for the hasty post and wrong turn in the middle there.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Yaa. good good very good problem and suggesstion.
fgff
|
|
|
|
|
Hi!
I have a gridview (a table from the database with 4 columns) and I want to show in a column the last modified (last update) of another column.
For example:
If the user changes the value of “state” column, you will see the date and time of this change in the “last_modified” column.
How can I do that?
Thanks in advance!
Best regards
Klaus
|
|
|
|
|
Create in DB another columan named modified_date. And with every update this date with the latest one and bind this to your data grid.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Hi!
Create in DB another columan named modified_date -> no problem!
I have created a new column in the database. .
And with every update this date with the latest one and
-> How can I do that? This is my problem!
Bind this to your data grid. -> no problem!
Thanks in advance!
Best regards
Klaus
|
|
|
|
|
In your update state ment add one more line
modified_date = getdate()
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
You can use sql server getDate() method to get the current datetime. you can also pass System.DateTime.Now from your code.
Faraz Shah Khan
MCP, MCAD.Net
Blog
|
|
|
|
|
i have two textboxes and a button in a form.
on the formload i am keeping the focus in the textbox.
on pressing enter(text changed event of textbox) , while the focus is lying in the textbox , it populates the pertaining valus in the another textbox.
i have done one more thing , while the user presses the button , it checks whether the tetxboxes are blank or not , if it is blank , then it prevents , submitting the form and invokes the message box.
Now the problem is when i presses the enter , while the focus is in the textbox , it invokes the alert box that the textboxes are empty.
But i don;t want this , it should populate the pertaining value in the another textbox.
PLease sort out this problem
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
modified on Monday, March 31, 2008 7:03 AM
|
|
|
|
|
Hi
On the textbox you can add an onkeypress javascript event like this:
onkeypress="doSomething();" You can then check the keyCode and if it is 13 the enter key has been pressed and you can perform the desired action.
<script type="text/javascript">
function doSomething() {
if (window.event && window.event.keyCode == 13){
}
}
</script>
|
|
|
|
|
Like onkeypress for detecting the keyboard keys , is there any way to detect the mouse keys, like onmouselfetkey , this is merely an example to mak eu understand the problem , can i do something like this ?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|