|
Hai,
Just started to work with Visual web developer 2005. I want to know how to change the background color of a textbox when it gets focus. Please provide step by step instruction in doing so.
Thanks
|
|
|
|
|
The TextBox control only exists on the server, in the browser all that exists is the html code that the control created, i.e. a form field. As getting focus is something that happens in the browser, you have to use Javascript for that, so it really has nothing to do with ASP.NET.
---
single minded; short sighted; long gone;
|
|
|
|
|
Visual Studio Professional 2005 - C# 2.0, ASP .Net
How do you go about sending reminder notices? I've got an application that the client wants to have a reminder for different tasks go out on various intervals.
Right now it's in an access.mdb file. If a user registers and completes a form we want to remind them that in X more days they need to complete another form. I know how to send the email and all that. What I don't understand is what mechanism you use to track time on a per row basis. Meaning row 136 was entered on February 12th, 7 days later something (what would be a good something) sees that and sends a reminder.
Suggestions? Ideas?
|
|
|
|
|
Ideally, you would write a Windows service to sit in the background and regularly check to see if any notifications need to be sent out.
If it were SQL Server, you could set up a Job to run at regular intervals.
However, if you're absolutely stuck, and out of options, and if the Web site receives a fair amount of evenly dispersed (time-wise) traffic, you can rely on the usage patterns to check for pending notifications. Not a great solution, and if traffic ever falls off, your notifications won't get sent out when they need to be.
I suppose you could also expose a public Web service, and then have an external app "ping" that Web service to tell the server to check for and send notifications.
|
|
|
|
|
Yeah, I was just going to write an .exe and run it at scheduled intervals using the Task Scheduling service. But those are all great ideas. If it is SQL Server (which it might be in production) do you have a link to more information?
|
|
|
|
|
I don't have a good one off hand, but look up SQL Server Jobs.
Sorry I didn't respond sooner. I was at a "lamaze" class all day (they don't call it that nowadays), then had dinner with the in-laws.
|
|
|
|
|
I had a similar requirement once, designed it with a windows service periodically checking a table for new records (SQL Server 2000)and sending Emails. But if you are using SQL Server 2005, you may be interested in looking at Notification Services[^] a built in feature.
|
|
|
|
|
Hi all,
I am getting a strange problem when i try to attach a file with a mail message.
Here`s the code..
MailMessage msg=new MailMessage();
msg.To=emailaddr;
msg.From=Fromemp;
msg.Subject="Hello " ;
string attachedFile = UploadCV_File.PostedFile.FileName;
MailAttachment ma=new MailAttachment(attachedFile);
msg.Attachments.Add(ma);
SmtpMail.SmtpServer="localhost";
SmtpMail.Send(msg);
The problem is that it gives an error when i select a file path which is long ie C:\Documents and Settings\Administrator\Desktop\New.txt and doesn`t gives an error if the path is short ie C:\New.txt.
What`s the problem????Help!!! Thanks in advance
|
|
|
|
|
The spaces are what's killing you. Try replacing the spaces with the ascii equivalent.
|
|
|
|
|
Sorry!!!, but replacing spaces with ascii code also doesn`t work .Here is what i did...
MailMessage msg=new MailMessage();
string filename=File1.PostedFile.FileName;
filename.Replace(" "," ");
attachment=new MailAttachment(filename);
msg.To=To_usr.Text;
msg.From=From_usr.Text;
msg.Body=TextBody.Text;
msg.Attachments.Add(attachment);
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.SmtpServer.Insert(0,"127.0.0.1");
SmtpMail.Send(msg);
Is this approach right?? What should i do now?
|
|
|
|
|
Well, if it's working then it's right. If not...
Try doing a Response.Write(File1.PostedFile.Filename);
See what it's actually getting. Response.Write should output it to the very top of your web page. You can also use System.Diagnostics and then do a Debug.Write(File1.PostedFile.FileName);
|
|
|
|
|
Well i did Response.write but it still shows spaces and hence gives invalid attachment error.I can`t use the alternative of copying the file on server and then attaching it to the mail message.
|
|
|
|
|
Have you given appropriate permissions to ASP to do this? You need to give IIS IUSR and IIS IWPD the correct permissions so they can write files to the server.
Oops, never mind. I was thinking we were uploading to the server...
Have you let someone else test your site from another PC to see if the have the problem?
|
|
|
|
|
The app is still under construction and hasn`t been uploaded on a server.It`s still on my PC.
|
|
|
|
|
It may sound silly, but try preceding your file path string with the @ symbol... ascii should work too.
Nila
|
|
|
|
|
How to write coding for treeview.There is no treeview control in Toolbox. i saw many article for treeview but i didn't get.pl send me coding for treeview
Thank you
|
|
|
|
|
treeView control is in .net 2005 .
have you .net 2.0 or not
|
|
|
|
|
If you are using 2005,Its in the Toolbox under Navigation
|
|
|
|
|
fill the sitemap with nodes and choose the sitemap datasource for the tree view
Best Regards
3ala2
|
|
|
|
|
Hello Everyone,
I am creating one application in ASP .Net that is creating Excel template based on the details captured from database.
Now, my working criteria is that i am working on veritual directory say, VD1. Now, one of the subdirectories contains Excel Template from which new template is to be generated and displayed in the client browser.
As part of the requirement, newly generated template is to be placed in the directory which is physically placed anywhere on the Hard Disk but is registered as a virtual directory, say, VD2.
Now, the question is that, can i access the physical path of the virtual directory VD2 from one of the pages of directory VD1?
I tried with Server.MapPath method call, but it didn't worked out as it returns physical path in context to directory VD1 only.
Can anybody help me out in this area?
Regards,
Umesh.
|
|
|
|
|
Hi I m new to ASP.NET. I want to develop my own website. Where to Start. I mean How to Create Header of my Website. Please Help me. I want to use VB.NET as code behind.
|
|
|
|
|
u mean graphic ? or code ?
|
|
|
|
|
|
Buy a book. Seriously, if you need to ask this broad a question, you need to work through a book before you know enough to ask questions that people can hope to answer in a way that you can understand.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i am making web application using C#, Asp.net (Visual Studio 2005).
i have made report using crystal report and CrystalreportViewer i set Show print option true Now i want to print whenever user click it .
i have found PrintToPrinter method. but i am confuge where to write this code so that user click print option provided in crystalreportViewer
i know this may look bit awkward but i really want to know
please help
thanks
regards
imran khan
|
|
|
|