|
Use javascript for the validations since u cant filter the HtmlInputFile control.
Ask if u want the code u have 2 do it in the onchange method.
|
|
|
|
|
Use javascript for the validations since u cant filter the HtmlInputFile control.
Ask if u want the code. u have 2 do it in the onchange method.
|
|
|
|
|
you should use this code:
private bool IsAccept(string fileName)
{
bool ok = false;
string ext = System.IO.Path.GetExtension(fileName);
if (ext == ".jpe" || ext == ".jpeg" || ext == ".pjpeg" || ext == ".gif"
|| ext == ".jpg" || ext == ".bmp" || ext == ".png" || ext == ".x-png")
{
ok = true;
}
return ok;
}
Hope that help you!
vtkiet05
|
|
|
|
|
javascript cannot interact with the input control, or the file system, AFAIK.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I guess the code vtkiet05 shows us is Server-side code. not Javascript. I believe that that code is not interacting with File System. It's just trying to get the extension of file by using System.IO.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
|
hi Guys
Is there any live application to search for code, we have lots n lots of sites to get the source codes, why cant we make a web application with a good search engine to search pure text source code, anything related to code.
For eg. store procedure's, HTML, ASP codes, technical text, code-behind, javascript, java codes,
only pure text should be stored, its should be a very simple application with no links, only to maintain and retrieve, there will be no data editing for the users.
uploading of files are not allowed since many technical websites are providing this feature,
The plan
Here the users can store information taken from the internet(pure text) when he/she visits for reference, later he/she need not come to this same link to take the specific code, instead he/she can search the code in this new Code Manager portal,
the user will have to provide the description of code or technical text and each source code should be allocated under different sets,
for eg. if its HTML code, the language should be set as HTML for this source code
How the search works
A search with different criteria should be given..
based on desciption
based on language
based on date stroed
based on unique words,
base on tags
we should make this application very simple to handle
winnie
|
|
|
|
|
I don't think we need that. We already have Google. I don't even use Google Code Search. Web Search and Blog search are good enough...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
even i understand that.. since Google is the mother of all searches ,
but here in code manager it be will used as a follow up, coz the user who's going to search for a code can be very sure that code will exists coz this portal will be used by coders,, there will no other link to browse around. its like having a reference just like a what a LIBRARY does
regards
winnie
|
|
|
|
|
codelinks wrote: Here the users can store information taken from the internet(pure text) when he/she visits for reference, later he/she need not come to this same link to take the specific code, instead he/she can search the code in this new Code Manager portal,
Violation of copyright laws.
Moreover your question has nothing related with ASP.NET. Better forum would be Lounge.
|
|
|
|
|
Spamming the whole site won't win you any friends.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi codelink,
Don't say like that here. dude.
"Christian" is the one who is always helping to solve other people's problems here.
From our point of view, the way you are doing is not good.
Be careful. friend. Enjoy!
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
hi Michael
i know christian is a very good professional, he has contributed in code project a lot..his work in code project shows it all.... you cant compane christian with any one around here.. but i posted a question which would benefit all of us,,
im sorry if i hurt any one in this group......
regards
winnie
|
|
|
|
|
Thanks for understanding. my friend.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
I have made a user control where I have used menu control.When I am using the site on my computer it is running fine with Mozilla 2.0 and IE 6.0 but when I am running it on different computer, all the menu item's location get disturbed.
Anybody have any idea what is the problem?
I am using .NET 2.0 and IE 6.0
|
|
|
|
|
bhavna816 wrote: when I am running it on different computer, all the menu item's location get disturbed.
The same verion of browsers installed in different computer?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
yes! the same version of IE is installed on both the computers i.e. IE 6.0
|
|
|
|
|
|
S A R I T H wrote: how can i impliment Thread in treeview.
Thread in TreeView?
Why do you need to do like that? maybe. Ajax might be the solution for you..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
i hav to print numbers like this
1,proc 1
11,proc2
2,
12,
3,
13,
4,
14,
5,
15
could u pls help me
Sarith...
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you
|
|
|
|
|
You make me more confused. What is the relationship between treeview and printing?
S A R I T H wrote: i hav to print numbers like this
1,proc 1
11,proc2
2,
12,
3,
13,
4,
14,
5,
15
What are those all numbers?
BTW, We have same signature.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
your question makes no sense. Even your post where you show a whole bunch of numbers makes no sense, but trying to relate it to this post, makes even less sense. What are you trying to ask ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello Everyone,
I want to send email through my mail domain using coding in ASP.NET
Can anybody let me know how is it possible
But I'm getting an Error Could not access 'CDO.Message' object.
I'm putting my coding below plz have a look and suggest me the way
MailMessage mail =new MailMessage();
mail.To="manoj.msb1984@gmail.com";
//mail.To="mail@saamstesting.com";
mail.From="mail@saamstesting.com";
mail.Subject="Your Password";
mail.Body="This is Ur Password";
try
{
SmtpMail.SmtpServer="mail.saamstesting.com";
SmtpMail.Send(mail);
lblMsg1.Text="Mail Sent Successfully";
}
catch(Exception ex)
{
lblMsg1.Text=ex.Message.ToString();
lblMsg1.ForeColor=Color.Red;
}
Plz....................
|
|
|
|
|
http://www.systemwebmail.com/faq/4.2.3.aspx
This is probably the most common error thrown by System.Web.Mail. If you get this error, the FIRST THING TO DO, is to write out all InnerException messages.
This will tell you the true error and it will be easer to fix. See Checking the Exception (READ THIS FIRST)[^] for more information.
Although this error message implies there is a permission problem, typically there isn't. However, after trying everything else, you may will want to try the suggestions listed at Error loading type library/DLL.
Now, on to some suggestions:
Suggestion 1
Specify a valid mail server for the SmtpMail.SmtpServer property. If that property is not set, at least set it to 127.0.0.1. For example:
SmtpMail.SmtpServer = "127.0.0.1"
Suggestion 2
If you are using "localhost" or "127.0.0.1" as the SmtpMail.SmtpServer, you may not have permissions to relay through the IIS SMTP Service. To allow access, open up the IIS Admin MMC. Locate the SMTP Virtual Server, and right-click, then select Properties. On the Access tab, click the Relay button. In the Relay Restrictions dialog, grant your IP address (127.0.0.1) to the Computers listbox. Close down all dialogs, and restart the SMTP Service.
Suggestion 3
If you are using "localhost" or "127.0.0.1" as the SmtpMail.SmtpServer, make sure Anonymous access is allowd. To allow access, open up the IIS Admin MMC. Locate the SMTP Virtual Server, and right-click, then select Properties. On the Access tab, click the Authentication button. Be sure "Anonymous Access" is the only checkbox checked. Close down all dialogs, and restart the SMTP Service.
Suggestion 4
The email address does not have a valid TO address. After iterating through the InnerExceptions, you may find this error message actually has to do with relaying. Try sending a test email to an email address that exists on the server specified by SmtpMail.SmtpServer. If you can send an email to that server, then it is a relay issue. Talk to your mail server administrator about letting your code relay through the mail server.
Suggestion 5
Use a real FROM address that exists on the SmtpMail.SmtpServer. Do not use something like "asdf@asdf.com", or some other bogus address as your MailMessage.FromProperty. More advanced mail servers will catch this, and will deny relaying.
Suggestion 6
I have no idea why this suggestion works, but I found it on the web. I figured I would mention it, just in case Suggestion 1 did not work. Instead of specifying
SmtpMail.SmtpServer = "127.0.0.1"
try
SmtpMail.SmtpServer.Insert( 0, "127.0.0.1 or your mail server name here")
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hello I've followed up all points suggested by u
but unfortunetly i couldn't get nothing
And further, when i'm using the Smtp Server="127.0.0.1" as you asked me to do
then "Mail Sent Successfully" message i got but at my gmail account i got nothing ........ no mail........
Plz suggest me ................
|
|
|
|
|