last day (14 days later) » 

11:55 AM
0
A: mail attachments using asp.net

Clark KentSet your form enctype to multipart/form-data. Otherwise the file does not get posted to the server and your attachment will not be sent. <form runat="server" enctype="multipart/form-data">

 
I don't have form tag in the page...its designed by site.master
 
You can safely add the enctype attribute to the form tag in site.master. It should not affect the behaviour of other forms.
 
...I have added it but still the attachment is not going
 
can you put a breakpoint on this line "if (fuAttachment.HasFile)"? Is the value of HasFile true?
 
...while trying to do this from a separate page the file got uploaded in the server but from this page its not uploading and surprisingly there is no error also showing
 
11:55 AM
So the problem is not the code that sends the mail. The problem must be in the webform. Can you debug the page, use your browser to view the html and post the <form> tag that is rendered into the page please?
 
Surprisingly I just found from this code if I click on any button that is not triggering any functions...whereas there is no error its showing...shall I share those files with you here...can you please check it once
 
Sure, no problem
 
hi
shall I send you the files?
 
Sure! No problem. I can look at it briefly
 
okies
you can download this zip file
here the default.aspx and default.aspx.cs file is attached
 
12:00 PM
ok
 
the application is here idc.interlinktravels.com/lanka/default.aspx
 
the problem is that you are using an update panel
you cannot put file uploads in an update panel
 
oh...
then?
actually i need to have a modalpopup there
 
with jquery?
 
ajax
 
12:03 PM
and that does not work without an update panel
correct?
 
the code I have followed din't work without update panel
 
where are you from by the way?
 
INDIA
 
:) holland..
 
the code I have followed din't work without update panel
OH...have you heard of fotokonijnenberg.nl?
 
12:06 PM
no
maybe you can put the updatepanel around the modalpopup only?
 
oh...:( they are my client from holland
ok let me try...but still in that case this will not work
as the file upload button will be in the modalpopup only
 
that will be a problem
 
any other way out other than updatepanel?
can I use popup without using updatepanel?
 
why don't u use a jquery dialog? jqueryui.com/dialog
you just need to change the styling. Doesn't make sense to include a bunch of server side scripts to have a modal popup..
also note that your stylesheet is pointing to your local computer
it will break when you upload it
 
can you please help me coding this...am not very good with asp.net
 
12:11 PM
<link rel="stylesheet" href="http://localhost:2443/code.jquery.com/ui/1.11.0/themes/smoothness/jquery-u‌​i.css">
sorry that will take me too much time
 
hmmm ok
let me see
 
Good luck!
 
thanks a ton
 
You're welcome!
 
hi
u there?
 
 
1 hour later…
1:23 PM
hi Clark...I just create the popup in jquery
but while clicking on the submit button the popup displays but suddenly the page goes refeshed
 

last day (14 days later) »