|
It will try and run the exe on the server, 'cause it's server side code - not on the client...
|
|
|
|
|
You're fundamentally lacking knowledge of how ASP.NET runs. All code in your code behind is run on the server. While you're developing your machine is essentially the server so the exe will run on your machine. When deployed to a web server, the exe will open on the server (assuming it had permission, which it usually wont in a live environment).
Your only option is to allow the user to download the exe, and let them decide to run it. You, after all, cannot expect to dictate to the user what they should run from a webpage - imagine the security implications.
|
|
|
|
|
Good Afternoon All
In all my Application, i used to write my login screen and i will not have a problem. i have inherited the ASP.NET Application that uses a login control.
Below are the pics of how it looks
here is a code for Forget Password link
protected void btnForgot_Click(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
PasswordRecovery1.Focus();
multiviewLogin.ActiveViewIndex = 1;
if (Login1.UserName != "")
{
PasswordRecovery1.UserName = Login1.UserName;
}
}
}
and for Change Password code
protected void btnChangePassword_Click(object sender, EventArgs e)
{
ChangePassword1.Visible = true;
if (Login1.UserName != "")
{
PasswordRecovery1.UserName = Login1.UserName;
}
}
Now my Problem is that when a user enters a username and password that are correct, and Click the "Forgot Password" button , it logged teh user in the system. It is doing the same thing as the "Change Password". But if i Crear the Username and Password textbox in the Login control it goes to the right place. So i have tried to crear them when the "Forgot Password Button is clicked and set them to empty strings, well for username its working, but for password i get an error that says the property is a Readonly
i tried to do them like this
if (!Page.IsPostBack)
{
if (Login1.UserName != "")
{
Login1.UserName = "";
Login1.Password = "";
}
PasswordRecovery1.Focus();
multiviewLogin.ActiveViewIndex = 1;
if (Login1.UserName != "")
{
PasswordRecovery1.UserName = Login1.UserName;
}
http://www.vbforums.com/attachment.php?attachmentid=69035&stc=1&d=1234438104[^]
What is the Problem
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
Hello Friends,
I'm playing video(s) in my web site. The details of the videos are stored in a XML file and the information are displayed in the gridview. There is play button in each row and as i click on the play button a video of that row is played. But there is problem is IE its caching the videos and playing the same video even i click on other video button. Its working fine in Flock and Mozilla.....so suggest the way to come out of that problem
|
|
|
|
|
Hai i am having a problem in sending a mail using asp.net in C#.It always showing error. So i need you to guide, how to send email from localhost using C# and please send coding to this id shankarganesh.mca@gmail.com
|
|
|
|
|
using System.Web.Mail;
protected MailMessage MMsg;
MMsg = new MailMessage();
under button click event write the below
MMsg.From = txtFrom.Text;
MMsg.To = txtTo.Text;
MMsg.Subject = txtSub.Text;
MMsg.Body = txtDesc.Text;
MMsg.Priority = MailPriority.High;
SmtpMail.SmtpServer = "";(Here u have to give ur server IP)
SmtpMail.Send(MMsg);
|
|
|
|
|
I've one crystal report of asp.net 2.0 and code behind c#.
I can open the report well. But If I click the next page symbol, It is going from 1st page to 2nd page. If I click again the next page, It is not moving to 3rd page. My page is refreshing and showing the same 2nd page.
If I click the last page symbol, It is moving to last page. And then I click the previous page, It is moving to 2nd page. But my report has 110 pages.
What the problem will be?.
More over, If I enter 3 in the provided box and click "Go To" option, it is moving to 3rd page. As well as, whatever pages I want, I could enter the number in the box and then I could move. I dont know why I could not move from 2nd page to 3rd page by using the Visual Studio 2005 provided option in the report. Anything idea pls.
Balasubramanian K.
|
|
|
|
|
Hello,
How do i remove the new line from:
<a href='<%#Stire.aspx?id=" + DataBinder.Eval(Container.DataItem,"id")%>'>> <"<%#DataBinder.Eval(Container.DataItem, "Nume")%>"> </a>
Any ideas?
|
|
|
|
|
How come id / name has new line char ?
and why you are using asp.net like classic asp ?
just use code behind
i.e.
HyperLink1.Target = Stire.aspx?id=" + DataBinder.Eval(Container.DataItem,"id");
HyperLink1.Text = DataBinder.Eval(Container.DataItem, "Nume");
if you want to remove the newline then read those values in to string varialble.
i.e.
string value1 = DataBinder.Eval(Container.DataItem,"id");
value1 = value1.Replace("\n\r",""); (or "\r\n" )
and then use value1
|
|
|
|
|
Hello friends,
i am new to asp.net,
i need to read ,write(update) a text file from the asp.net page with C#,
i started with system.IO and stream reader, writer
i know i have to do find the path and show the details in to page,
and write the content from page and save it to the file..
but couldnot move further...
could you please help
self confidence+hard work=SUCCESS
|
|
|
|
|
MS Lee wrote: self confidence+hard work=SUCCESS
'No Self confidence' + 'Others doing your job'= 'FAILURE'
Try it first, google the problem, try the solutions, and if you don`t get it, post your code here. It is only then you might learn and understand it better.
Man learns from his failures and not success.
When you fail to plan, you are planning to fail.
|
|
|
|
|
1) why to create proxy for WCF service. what is diffrence between
adding by rightclick->Add Service reference
& creating proxy.
2) why to create XSD files while making WCF service. And why to generate class frm that.
modified on Thursday, February 12, 2009 5:53 AM
|
|
|
|
|
Hello,
i add the following tags in web.config file in my project to set the session to 200 minutes
<sessionstate mode="InProc" cookieless="false" timeout="200" />
but the session is lost in some minutes,i 'm using system file project so i don't need to set session in IIS is the web.config enough to set session duration.
Thank you for answer
modified on Thursday, February 12, 2009 4:46 AM
|
|
|
|
|
If you are changing the code afte4r login then the Session is Expired
Best Regards,
Chetan Patel
|
|
|
|
|
No i'm not changing the session duration with code.
|
|
|
|
|
There a several places that timeouts can come from, web.config, the page, IIS and the users browser... IIS is usually the culprit.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi,
I am new to Repeater manipulation.I have to delete a particular row in the Repeater display. The fields in the repeater are id,name,department,salary and for each row i created a Delete button.
If I click the delete button the corresponding row will be deleted.
Can anyone tell how it is possible?
|
|
|
|
|
If you are displaying tabular data, GridView will be better than repeater. It allows you to handle the Item commands and do necessary action.
|
|
|
|
|
You can set the commandargument property of the delete button as the id like this.
<asp:button id="btnDelete" runat="server" text="DELETE" commandargument="<%#bind(" username")"="" xmlns:asp="#unknown"> />
This will refer to corresponding row id for deletion.Then in rowcommand event get the id by writing id=e.commandargument;
after getting the id you can delete the row by using sql query.after that just rebind the repeater.That's it.
Thanks,
Satish
|
|
|
|
|
There is no Row command event for Repeater.
|
|
|
|
|
sorry just write in the itemcommand event
|
|
|
|
|
The control is not enter into the Item command event. what to do?
|
|
|
|
|
Do you mean to say onclick of delete button it is not going into itemcommand event or what???
|
|
|
|
|
Yes. If the button is clicked i write a simple response.write inside the item command event. But it s not enter into the event? Is there anything to declare?
|
|
|
|
|
I think you just create that event again by deleting the existing one.
And in the repeater declare the button as below.
<asp:repeater id="rptrreview" runat="server" datasourceid="SqlDataSource1" onitemcommand="rptrreview_ItemCommand" xmlns:asp="#unknown">
<itemtemplate>
<asp:button id="btnDelete" runat="server" text="DELETE" commandargument="<%#bind(" username")"=""> />
then in the itemcommand event get the id of the row as below.
Button delete = (Button)rptrreview.FindControl("btnDelete");
string data = e.CommandArgument.ToString ();
If any problem let me know
|
|
|
|