|
hihi onclick the confirm box do appear...
but the problem is i want it to execute in between my
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{}
Anyone knows if i am on the right track(but some error on my code) or i need to use other methods?
Need help!!!!!
|
|
|
|
|
Sorry I didnt get whats the exact problem can u please explain it??? Do u mean that it should get executed on button click event??
|
|
|
|
|
hihi!
Im saying that if i use
protected void Page_Load(object sender, EventArgs e)
{
Login1.Attributes.Add("Onclick", "return continuePreviousLogin()");
}
the function will run whenever user click on any point in logincontrol box.
But, i want the fuction to run only in Login Authenticate. In between the following function......
-----------------------------------------------------------------------------
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
string userName = Login1.UserName;
string password = Login1.Password;
if (GetUserPassword(userName) == password)
{
Session["username"] = userName;
//e.Authenticated = true;
FormsAuthentication.RedirectFromLoginPage(userName, false);
DateTime CurrTime = DateTime.Now;
Session["logintime"] = CurrTime.ToLongDateString();
if (GetUserStatus(userName) == "1")
{
Session["UserRight"] = "Administrator";
Response.Redirect("admin.aspx");
}
else
{
Session["UserRight"] = "Customer";
Response.Redirect("CustomerLoginMain.aspx");
}
}
Response.Write("alert('" + "Error logging in" + "')<" + "/script>");
}
----------------------------------------------------------------------------
ehhhh.....do u understand this way?
lene......
|
|
|
|
|
I think u will have to change the logic of javascript function so that it doesn't pop up confirm msg everytime...
|
|
|
|
|
hai,
Login1.Attributes.Add("onsubmit", "javascript:CheckLogin();");
call this in page_load event.
Thanks
Subbu.
|
|
|
|
|
U have to give this in Page load only..
|
|
|
|
|
First thing
When you have to call the javascript function ?
please tell the event with some discription what you want to do in javascript function
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hi
I want implement a relation between a web application form and a windows form.
web application is by vb.net and the winform is by c# !!!
is it possible directly or must using a web service ?
H.R
|
|
|
|
|
That depends. What kind of relation?
---
single minded; short sighted; long gone;
|
|
|
|
|
H.R wrote: want implement a relation between a web application form and a windows form.
web application is by vb.net and the winform is by c# !!!
is it possible directly or must using a web service ?
You can post from the Winform to a page on the website and get the result back (as XML response for example). That way you don't have to create a web service.
But why not use web service. It is very simple to create a basic web service to do the same in a more efficient way.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
many thanks
it is an e-examination project that for some things , must use of a winform in.
end user is dealt with the winform to testing, and the webform should be aware of winform running from first to end of the exam.
(momentarily the winform should reporting to the webform about itself running and result of tests)
web service is the best ?!!!
H.R
|
|
|
|
|
H.R wrote: it is an e-examination project that for some things , must use of a winform in.
You can still call a web service from a windows form.
H.R wrote: end user is dealt with the winform to testing, and the webform should be aware of winform running from first to end of the exam.
You can create a method in the web service and keep calling it every few seconds to verify with the web service that the test taker is still connected and taking the test.
H.R wrote: web service is the best ?!!!
I think a Web Service would simplify the system and make it more user friendly. Personally I would recommend a Web Service over a Post to Webpage based system.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
thanks for your leading
H.R
|
|
|
|
|
Any help would be aoppreciated. I'm trying to pass the login username information into a sql table filter on column containing names. I have tried WHERE statement but can't find how to pick-up user name.
Steve
|
|
|
|
|
If the query is related to database or ado.net then you are in wrong forum
Any way check you query and what are your fields in that table
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Is there anyway of creating autoevents, i.e. daily e-mail reminders etc?
I have a dedicated server and I'd like to able to send out reminders, and other stuff on a nightly basis.
Thanks
|
|
|
|
|
Here is a suggestion. Schedule a windows task, to call a .NET windows application, which invokes a web page through which you send your nightly emails. I hope that makes sense.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Not really!
I take it you mean a Windows Event to load a URL? Can you assist further please?!
Cheers!
|
|
|
|
|
Here is what I had in mind:
I. Create a Windows .NET EXE Application using this function that calls an asp.net web page which would do your nightly autoevent:
http://www.codeproject.com/script/comments/forums.asp?forumid=1646&mode=all&userid=1587313&select=2183223&df=100&fr=2109.5#xx2183223xx[^]
II. Schedule a Windows Task:
1- Go to the following menu option on the start menu:
Start > All Programs > Accessories> System Tools > Schedule Task >
2- Double click on the "Add Scheduled Task" icon. The Scheduled Task Wizard will pop up.
3- Click Next. On the next screen, click the browse button and select the windows "EXE" program you just created.
4- On the next screen, choose Daily, Monthly, etc (how ever often you wish to run it) and hit next.
5- Choose the time and hit next.
6- Enter a username and password and hit next.
7- Click finish to finalize the scheduled task.
That should do it.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
hello !
a problem xml and gridview
XML file: aa.xml
<
<br />
<big><br />
<a><br />
<b id="1"><br />
<c> value 1 </c><br />
<c> value 2 </c><br />
<c> value 3 </c><br />
</b><br />
<b id="2"><br />
<c> value 1 </c><br />
<c> value 2 </c><br />
<c> value 3 </c><br />
</b><br />
</a></big><br /> >
'=====================
the following is asp.net code:
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="aa.xml"
XPath="//b[@id="1"]/c/text()">
<asp:GridView ID="GridView1" runat="server" DataSourceID="XmlDataSource1">
'=========
is no result.
i need gridview result is :
-----------------
| b |
|---------------|
| value 1 |
| value 2 |
| value 3 |
-----------------
help?????
hello!
|
|
|
|
|
hello !
a problem xml and gridview
XML file: aa.xml
'===============
<c> value 1
<c> value 2
<c> value 3
<c> value 1
<c> value 2
<c> value 3
'=====================
the following is asp.net code:
<asp:xmldatasource id="XmlDataSource1" runat="server" datafile="aa.xml"
="" xpath="//b[@id=" 1"]="" c="" text()"="">
<asp:gridview id="GridView1" runat="server" datasourceid="XmlDataSource1">
'=========
is no result.
i need gridview result is :
-----------------
| b |
|---------------|
| value 1 |
| value 2 |
| value 3 |
-----------------
help?????
hello!
|
|
|
|
|
Sorry but one post is enough What you tried so far
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I am developing a website in asp.net. In one of the form i need to bind the controls with database. i am using vb.net on back side.
i want ,when we click on next button next record should be shown.
i have done this in vb.net window application ,in that case
i was using:
'Rbtnop1.DataBindings.Add("text", ds, "paper.op1")
'Rbtnop2.DataBindings.Add("text", ds, "paper.op2")
and on button click i was incresing the position by 1 so that next record can be shown.but this is not working in case of web controls.so can tou suggest me something regarding this.
|
|
|
|
|
StringBuilder sbData = sbDataToPost(SendingParameter);
SendingParameter.Url = "www.myweb.com/index.php";
System.Net.HttpWebRequest Request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(SendingParameter.Url);
Request.Proxy=System.Net.WebProxy.GetDefaultProxy();
Request.Method = "POST";
Request.ContentLength = sbData.Length;
Request.ContentType = "application/x-www-form-urlencoded";
try
{
System.IO.StreamWriter srWriter = new System.IO.StreamWriter(Request.GetRequestStream());
srWriter.Write(sbData);
}
catch
{
return false;
}
System.Net.HttpWebResponse Response = (System.Net.HttpWebResponse)Request.GetResponse();
String ver = Response.ProtocolVersion.ToString();
System.IO.StreamReader reader = new
System.IO.StreamReader(Response.GetResponseStream());
string str = reader.ReadToEnd();
return true;
need help
thats my code and didn't work.
i read it on codeproject.and didn't work.
plz help.
|
|
|
|
|
Ahmad Adnan wrote: thats my code and didn't work.
Standard question #1:
What do you mean by "not working"?
Standard question #2:
What error message do you get?
What does the sbDataToPost method do?
What does SendingParameter contain?
Do you url-encode the data that you send?
Ahmad Adnan wrote: srWriter.Write(sbData);
There is no overload of the StreamWriter.Write method that takes a StringBuilder. Don't you get a compiler error on that line?
Ahmad Adnan wrote: catch
{
return false;
}
Don't catch everything and throw it away like that. Only catch the exceptions that you know how to handle, otherwise you'll never know what went wrong.
---
single minded; short sighted; long gone;
|
|
|
|