|
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;
|
|
|
|
|
Hi guys. Im doing a project at the moment that requires the user to select what categories they want to be registered for via check boxes. BUT there arent set categories(and no set number), so they must be read from the database, and then the controls must be generated.
So what I have done is put a place holder and then just create new controls in the while read loop of the database. Two problems though:
1) How do I name these(incrementally?)? I cant say
CheckBox chkBx + "i" = new CheckBox();
2) Even if I could incrememnt their names how would I see what they had checked once they click ok?
I thought about
lblStuff.Text += "<asp:checkbox id="\"check"" i="" runat="server" xmlns:asp="#unknown" />" (ignore the xmlns :-/ )
But that still leaves the second problem.
Am I going about this the wrong way?
Thanks guys
|
|
|
|
|
you can use CheckBoxList instead of creating Checkbox Dynamically..
and for CheckBoxList you can Bind the values form Database..
and onclick of OK, you can loop through CheckBoxList.Items.Count to check which is Selected and You can take only Selected Values..
|
|
|
|
|
Perfect
Thanks, really appreciate it!
|
|
|
|
|
Actually the idea is as follows...Suppose a new message to a particular client is updated in the database...now the server should post this message to the client without the client request (like the messages shown in Instant messaging etc). I think instant messaging and all the related stuff use the 'Poll' method to fetch data. My question is that can it be done without Polling ?
I mean like if there is no update then no communication should be there between server and client but if there is some message to be posted to the client then the server should itself send it without client request...
Please let me know if there is a way to do it...
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
modified on Thursday, February 19, 2009 1:48 AM
|
|
|
|
|
hi,
how to update a grid view using button field?I am using sqldatasource.
regards,
bill
|
|
|
|
|
write down the select query in click event of button and
bind the data dynamic in gridview.
eg.
com.commandtext="select * from tablename";
adp = new SqlDataAdapter(cmd);
adp.Fill(ds);
gridview1.datasource=ds;
gridview1.databind();
it will bind the data from database dynamically,
Regards,
Keyur Satyadev
|
|
|
|
|
<asp:gridview id="grid" runat="server" autogeneratecolumns="False" datakeynames="adminid" xmlns:asp="#unknown">
DataSourceID="sqldatasource1" Width="100%" >
<columns> <asp:boundfield datafield="adminid" headertext="S. No." sortexpression="adminid">
<asp:boundfield datafield="name" headertext="Admin Name" sortexpression="name">
<asp:boundfield datafield="doj" headertext="D.O.J." dataformatstring="{0:dd/MM/yyyy}" sortexpression="doj">
<asp:templatefield headertext="Login Name" sortexpression="username">
<itemtemplate>
<%#Eval("username")%>
<asp:templatefield headertext="Password">
<itemtemplate>
<asp:label runat="server" id="lbl_pswd" text="<%#Eval(" password")%>"="">
<asp:templatefield headertext="Action">
<itemtemplate>
<pagerstyle horizontalalign="Right">
<headerstyle cssclass="cartheader" height="20px">
<asp:sqldatasource runat="server" id="sqldatasource1" selectcommand="select * from table" updatecommand="set in sqldatasource update panel" xmlns:asp="#unknown">
ConnectionString="<%$ ConnectionStrings:ConnectionString %>">
|
|
|
|
|
hi all,
how to create my own widget for my web site. Also tat widget have to be embed in other site....
plz send me any example sites
Ashok
|
|
|
|
|
Hi
I am using currency converter web service in my web application.When I tried it on local server it is working absolutely fine. As I upload it on US server it gives error.
System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint) at System.Net.HttpRequestCreator.Create(Uri Uri) at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) at System.Net.WebRequest.Create(Uri requestUri) at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri) at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at CurrencyConvertor.CurrencyConvertor.ConversionRate(Currency FromCurrency, Currency ToCurrency) at CurrencyExchange.get_rate_USD(String fromCurr) at pricing_between.currencyAmt(String str_curr) The action that failed was: Demand The type of the first permission that failed was: System.Net.WebPermission The Zone of the assembly that failed was: MyComputer
Any body have any idea please solve it
Thanx
Seema
modified on Thursday, February 19, 2009 3:07 AM
|
|
|
|