|
|
I want to print in this format as Year,date,month.
<asp:linkbutton id="lnldat" text="<%# Eval(" cre_date","{0:yyyy="" mm="" dd}")%>"="" xmlns:asp="#unknown">
But it is printing in the format of 2009/22/3 (Year/Day/Month)? How to acheived the above format?
|
|
|
|
|
change your control panel setting.
go to regional language and set separator as , instead of /.
that will give the output as u want.
|
|
|
|
|
You do that by not mashing the date into a string at the Db in the first place!
If you return the date as a date in the first place, the .NET date formatting will work a treat.
|
|
|
|
|
Hi all,
i am stuck on a huge problem, i want to either hide, disable or be able to capture the event of the close button on a window.
Is there a way i can do this?
Thanks in advance!
living life on the flip side
|
|
|
|
|
you cannot capture browser close event...
umerumerumer
|
|
|
|
|
So is there anything i can do...such as hide or disable the button?
living life on the flip side
|
|
|
|
|
Agweet wrote: event of the close button on a window.
try using onunload="function()" with body tag
<body onunload="alert(1);">
</body>
|
|
|
|
|
Agweet wrote: i want to either hide, disable or be able to capture the event of the close button on a window.
There is no way for you to hide/disable the close button, as this poses security risks. Why would you want to do that anyway?
Regards,
--Perspx
|
|
|
|
|
what i am doing is creating a application where a certain user can only login with a specific username once at a time...so if a user logs in with administrator then some 1 else cant use that username, now the reason i want to disable the close button is that if a user pushes the close button then they need to get logged out in the database...hence i want to force them to use my logout button so i can execute the function to log them out...if that makes sense...please ask me any more questions if there is something you dont understand.
living life on the flip side
|
|
|
|
|
i think u can use session.
|
|
|
|
|
Hi, can u please elaborate for me on how i could use a session to log a user out?
living life on the flip side
|
|
|
|
|
What you want, is impossible. You *can* handle the unload event and send a message with AJAX to your server, but you still cannot guarantee that it will always be sent. Your best bet is to use the session and use a timeout, so that if someone doesn't log out, they have to wait until the timeout period to be able to log back in.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
so wat you saying is i should create a timer and set it as a count down timer...but then what will happen if a user click close, then how will it log them out?...i fail to understand what exactly you are saying!
living life on the flip side
|
|
|
|
|
i have two string values
"MM/dd/yyyy" & "dd/MM/yyyy"
when i assign to sql parameters if the culture accepts MM/dd/yyyy then it gives error on dd/MM/yyyy cannot convert string to datetime.
is there any way to convert string to datetime according to current culure
i have tried textbox.text.tostring(system.threading.thread.currentthread.currentculutre) but no use
datetime.parse(string) not do anything....
and i cannot use convert.todatetime function because these dates may b empty.
umerumerumer
|
|
|
|
|
you have to change the format of string using following way.this is for
binding the date with textbox.in your case you have to pass the date in
following way to your sql parameter.
eg.
]]>
Regards,
Keyur Satyadev
|
|
|
|
|
but i want to do it after picking it from the textbox
is there any way to convert string accoring to current system date time format
umerumerumer
|
|
|
|
|
actually right now i am facing problem like
DateTime.Today.Date.ToString(System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern)
it is not picking my system datetime format
always use MM/dd/yyyy even i am using dd/MM/yyyy
umerumerumer
|
|
|
|
|
use the following code
System.DateTime.Today.ToString("dd/MM/yyyy");
it will be work.
|
|
|
|
|
|
Encripted form ...
kkk i can Decript it ..
Bind repeter with dataset
first fill dataset ds in stored procedure
then use
if(ds.tables[0].rows.count>0)
{
repeter.datasource=ds;
repeter.datbind();
}
|
|
|
|
|
I want to create a public property in a class and i want to set the value from any web page and also get the property value from any webpage. How can i do that?
|
|
|
|
|
private string _name ="":
public string Name
{
get
{
return _name;
}
set
{
_name = value;
}
}
|
|
|
|
|
How can we access and set this property from any webpage. when i tried to access it is not coming in my webpage. my code as follows.
Class Code
namespace DatabaseLayer
{
public class AdminDAO
{
private string _name = "";
public string Name
{
get
{
return _name;
}
set
{
_name = value;
}
}
}
}
WebPage Code
DatabaseLayer.AdminDAO.
string name=DatabaseLayer.AdminDAO.
|
|
|
|
|
DatabaseLayer.AdminDAO.
string name = AdminDAO.Name;
or set AdminDAO.Name = txt_name.Text;
|
|
|
|