|
If you mean being able to send email using outlook email then yes.
Thanks
|
|
|
|
|
For that, I just to make sure your mail server work fine
So the issue is from ur code, can u post ur snippet of code here? or you might try to debug your code to see which line cause the exception...
<< >>
|
|
|
|
|
The error is on this liine:
mailClient.Send(mailMessage)
The error message is in the very first post.
Thanks
|
|
|
|
|
just make sure again...
is the SMTP server correct or not? the work station you used to send email is able to connect to SMTP server or not?
<< >>
|
|
|
|
|
yes because I believe this is how I can send emails to the outside.
Thanks
|
|
|
|
|
To send an email
just check few things first:
go to
1.) start -> run and type inetmgr
It will open the IIS and expand the tree of the web server
2.)Right Click Default SMTP Virtial Server -> Properties -> and selcet Access Tab
3.) Click on Relay -> Select Add and type 127.0.0.1 and Select 'Only the List below' Radio Button
4.) Click OK
5.) Now Go to Start -> Control Panels -> Admin. Tools -> Services
6.) Restart SMTP Service
And then trying Sending Mial from your code.
I am not sure wheather this will work with ASP.NET 2.0 but it surely work otherwise making it sure that we write the following:
Smtp.SmtpServer="127.0.0.1"
SmtpMail.Send(mail)
where mail is the instance of Mail Class
Do tell whether this helps or not.
Hope this works.
All the best
Cheers
Enjoy!
|
|
|
|
|
Hi,
I carried out the all the six steps you mentioned.
But can not get .SmtpServer in the code ?
Thanks
|
|
|
|
|
Stopped the anti-virus on my machine.
Now the error I get is:
{"Mailbox unavailable. The server response was: 5.7.1 Unable to relay for jo.bloggs@data.org.uk"}
|
|
|
|
|
using Net.WebClient can able to send sms throw web service?
its working when use the code at asp.net, but @ web service it not working.
may i know the reason if any one knows?
thx
raj
raj
|
|
|
|
|
Standard Question #1:
What do you mean by "Not working"?
Also, a bit of English help:
"throw" should have been "through"
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
i am getting error called "The page cannot be displayed". not able to receive the sms as well.
raj
|
|
|
|
|
Fist, you have to make sure your webservice's supplier work???
you can contact to get support from them
<< >>
|
|
|
|
|
I found the bug, now working fine…
Thanks
raj
|
|
|
|
|
Hi,
There is a requirement to be able to upload files using a website (asp.net 2.0) . There should be a kind of validation on these files before the upload is allowed. What I am not sure of is how can I do any kind of validation on the files before the upload? For example if a file of type excel or .txt is to be uploaded, the website has to first check to see if there are certain data in the file... then if all ok the upload is allowed.
Thanks
|
|
|
|
|
You will have to uploda the file to the server first and do the checking there. If the checking fails simply delete the file.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I guess I can let the user know what the problem was?
Thanks
|
|
|
|
|
Why not?
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Well... you can use Javascript to at least check the file extension - this doesn't guarantee the file is valid, of course, but it will help eliminate some innocent errors....
If you have a file input box on your form
<input id="file1" type="file" onchange="checkFile(this)" name="file1">
You can use the following function - change the line
var fileTypes=["gif","jpg","jpeg"];
to suit whatever file extensions you want to check for.
function checkFile(what){
var source=what.value;
var ext=source.substring(source.lastIndexOf(".")+1,source.length).toLowerCase();
// valid file types
var fileTypes=["gif","jpg","jpeg"];
for (var i=0; i<fileTypes.length; i++) if (fileTypes[i]==ext) break;
if (i==fileTypes.length) {
alert("THAT IS NOT A VALID FILE\nYou can only uload files with the following extensions:\n\n"+fileTypes.join(", "));
}
}
// -->
</script>
This script was adapted from one I downloaded from
The JavaScript Source!! http://javascript.internet.com
and the original was created by Abraham Joffe : http://www.abrahamjoffe.com.au/
They would probably appreciate your adding such comments to this script if you use it on a web-page.
cheers
Phil
-- modified at 4:26 Wednesday 26th April, 2006
|
|
|
|
|
Hi there,
Do you mean that you have to read the file's content to validate at client-side before uploading? if so, you upload file to server and validate at server-side. You dont have permission to read file at client
<< >>
|
|
|
|
|
|
|
For Print
1. window.print()
THis will print whole page
2. Give Link Print on click of which it will open IE popup using window.open()
which only contains grid control having same result and in that popup give print button on click of which it will print whatever there in the popup means as per our logic only grid with result.
You can hide print button using document.form.btnPrint.style.visiblity = hidden
OR
objBtn = document.getElementById(btnPrint)
objBtn.style.display = 'none'
|
|
|
|
|
hi
Ihave uninstall Microsoft IE WebControls and install ComponentArt still i didnt get any license key and performed a small program while compiling i get the following error
componentart_webui_client/2006_1_1208/A573G988.js not found
I am trying to search but in vain what exaclty this js file is .Can anyone who has worked with ComponentArt can explain me what went wrong.
When I can get the key I am using this coponent as trial basis .Please Guide me
thanks in advance
sasi
|
|
|
|
|
|
hai everyone
i m ajay.
i m facing a problem related to creating a textbox in template column of a datagrid at runtime.i am giving my code snippet.although when i m taking a label instead of textbox it works fine.but when i m dealing with a textbox it gives me the error
"Control '_ctl0__ctl2_lbl1' of type 'TextBox' must be placed inside a form tag with runat=server."
my coding is------
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data
Imports System.Data.SqlClient
Public Class WebForm1
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Template()
End Sub
Private Sub Template()
Dim DataGrid1 As New DataGrid
DataGrid1.AutoGenerateColumns = False
DataGrid1.GridLines = GridLines.Both
DataGrid1.BackColor = Color.Pink
DataGrid1.BorderWidth = Unit.Pixel(2)
DataGrid1.BorderColor = Color.Blue
DataGrid1.HeaderStyle.BackColor = Color.Yellow
DataGrid1.HeaderStyle.ForeColor = Color.Brown
DataGrid1.HeaderStyle.Font.Bold = True
DataGrid1.CellPadding = 10
Dim Field1 As String
Dim Field2 As String
Dim Header1 As String
Dim Header2 As String
Field1 = "name"
Field2 = "description"
Header1 = "Name"
Header2 = "Description"
Dim tempcol As New TemplateColumn
'Dim tbc As New MyTemp(ListItemType.Item, Field1, Field2)
'tempcol.ItemTemplate = tbc
' Header Template
tempcol.HeaderTemplate = New MyTemp(ListItemType.Header, Header1, Header2)
' Item Template
tempcol.ItemTemplate = New MyTemp(ListItemType.Item, Field1, Field2)
' Add Template into Grid
DataGrid1.Columns.Add(tempcol)
' Binding Data Source
Dim cnn As New SqlConnection("")
Dim da As New SqlDataAdapter("")
Dim ds As New DataSet
da.Fill()
DataGrid1.DataSource = ds
DataGrid1.DataMember = ""
DataGrid1.DataBind()
' Bind Grid into Label
' Me.lblShowGrid.Controls.Add(DataGrid1)
Page.Controls.Add(DataGrid1)
End Sub
End Class
Public Class MyTemp
Implements ITemplate
Dim TemplateType As ListItemType
Dim Field1 As String
Dim Field2 As String
Sub New(ByVal type As ListItemType, ByVal fld1 As String, ByVal fld2 As String)
TemplateType = type
Field1 = fld1
Field2 = fld2
End Sub
Sub InstantiateIn(ByVal Container As Control) Implements ITemplate.InstantiateIn
'Dim lbl1 As New WebControls.TextBox
Dim lbl1 As New TextBox
lbl1.BackColor = Color.Beige
Dim lbl2 As Label = New Label
Dim lc1 As LiteralControl = New LiteralControl
Dim lc2 As LiteralControl = New LiteralControl
Select Case TemplateType
Case ListItemType.Header
lc1.ID = "textbox1"
lc1.Text = Field1
Container.Controls.Add(lc1)
lc2.ID = "lc2"
lc2.Text = Field2
Container.Controls.Add(lc2)
Case ListItemType.Item
lbl1.ID = "lbl1"
AddHandler lbl1.DataBinding, AddressOf BindIntegerColumn
Container.Controls.Add(lbl1)
lbl2.ID = "lbl2"
AddHandler lbl2.DataBinding, AddressOf BindStringColumn
Container.Controls.Add(lbl2)
End Select
End Sub
Sub BindIntegerColumn(ByVal Sender As Object, ByVal e As EventArgs)
Dim lbl1 As New TextBox
lbl1 = CType(Sender, TextBox)
Dim Container As DataGridItem = CType(lbl1.NamingContainer, DataGridItem)
lbl1.Text = DataBinder.Eval(Container.DataItem, Field1)
End Sub
Sub BindStringColumn(ByVal sender As Object, ByVal e As EventArgs)
Dim lbl2 As Label = CType(sender, Label)
Dim Container As DataGridItem = CType(lbl2.NamingContainer, DataGridItem)
lbl2.Text = DataBinder.Eval(Container.DataItem, Field2)
End Sub
End Class
thanx in advance
any suggetion will be highly appriciated
ajay
|
|
|
|