|
hi
i am using smtp concept to sent mail . My code is like below:
System.Web.Mail.MailMessage objmail = new System.Web.Mail.MailMessage();
objmail.To = "bretto.be@gmail.com";
objmail.From = "bretto.abraham@aciin.com";
objmail.Subject = "Password Recovery";
objmail.BodyFormat = MailFormat.Html;
objmail.Body = "Name: " + strUserName + "\r\n" + "Password: " + strPassword;
objmail.Priority = MailPriority.High;
//
System.Web.Mail.SmtpMail.SmtpServer = "mail.aciin.com";
// System.Web.Mail.SmtpMail.SmtpServer = "64.187.101.246";
// System.Web.Mail.SmtpMail.SmtpServer = "192.168.0.25";
System.Web.Mail.SmtpMail.Send(objmail);
objmail = null;
but it will display error like this:
The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available
please help me.
with regards,
bretto
|
|
|
|
|
It looks like it should work from what i can see. have you tried doing a search in google for the error?
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
brettokumar wrote: but it will display error like this:
The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available
First Configre is SMTP Server. You code is fine. You need to Configure your SMTP server that allow you sebnd mail using SMTP.
cheers,
Abhijit
|
|
|
|
|
|
I don't know if i'd use an event handler for this but maybe an if statement and then code in the if statement to retrieve your values. eg
If(checkbox.checked)
{
}
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
|
|
Hi,
I am having 2 table. I want to delete records having same ID within 1 query.
e.g.
ID name
table1 1 a
table2 1 b
How can I do?
Thanks
|
|
|
|
|
you may want to ask this in sql section
I Wish the Life Had CTRL-Z
Wizard's First Rule : People are fool,they believe what they want to believe or what they afraid to believe
www.subaitech.blogspot.com
|
|
|
|
|
I have several pages ( suppose default.aspx, page1.aspx, page2.aspx,page3.aspx,page4.aspx) now what I need to do is from default page I need to navigate to either of other pages say page2.aspx or may be page3.aspx depending on the initial setting which I want to store in database.
Suppose I have first group of pages navigation as (Default.aspx-> page3.aspx-> page4.aspx)
And second group of pages navigation as (Default.aspx-> page1.aspx->page5.aspx)
Now if user related to first group is logged in then he should get first group of page navigation. And if user related to second group is logged in then he should get second group of page navigation(but how??)
How do I achieve this can any one please provide me simple logic
|
|
|
|
|
Not too sure what answer to provide but maybe assign a specific set of user rights to groups of users so that those groups can only access certain pages....?
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Hi
Can anyone help me in implementing paging for child grid while using childGrid inside parentGrid.
Thanks in advance
Honey
|
|
|
|
|
I have a grid view which contants a checkbox template column and a flag column. I need to make a div section of the page visible/invisible based on the flag of the row on which the checkbox is checked.
So i need to fire a checkbox click event on whcih I need to get the value of the second cell.
All these needs to be done in javascript.
Can any one help?
|
|
|
|
|
|
That will not help..
I want the event to be fired on the very time when the checkbox is clicked
|
|
|
|
|
I have taken dtalist inside the update panel. and inside datalist i'm rendering the images with a button. On click of that button i'm opening a popup to download that image. Without update panel its working fine but with update panel its not working.
Plz tell me what else i need to add to overcome this problem.
krishna veer singh
|
|
|
|
|
Here is one solution but in this case your page will be post back.
set PostBackTrigger to that button id.
<triggers>
<asp:postbacktrigger controlid="ImageButtonID" />
</triggers>
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thank you for replying...
Bur here problem is that... on runtime more that one item is creating in datalist so we can't use that button id because that id gone change in runtime.
krishna veer singh
|
|
|
|
|
I have a dropdownlist control in my gridview
When somone chooses an option from it an event is ran
I need to get a datakey for that row, how would I do that?
thanks
|
|
|
|
|
Try this
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values["here datakeyname"].ToString();
and in the source, for CommandArgument..
CommandArgument='<%#((GridViewRow)Container).RowIndex %>'
krishna veer singh
|
|
|
|
|
The event that is firing is an onclick event for the dropdownlist
Therefore
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values[""].ToString();
does not work because there is no command arguement for it
is there another way?
thanks
|
|
|
|
|
.netman wrote: The event that is firing is an onclick event for the dropdownlist
Therefore
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values[""].ToString();
Post your code where you create event handler of dropdownlist and dropdownlist event also
please don't forget to vote on the post that helped you.
|
|
|
|
|
DropDownList dr = (DropDownList)sender;
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values["code"].ToString();
SqlCommand cmd_update_order = new SqlCommand("update_order", con);
cmd_update_order.CommandType = CommandType.StoredProcedure;
cmd_update_order.Parameters.Add(new SqlParameter("@order", SqlDbType.Int));
cmd_update_order.Parameters["@order"].Value = dr.SelectedValue;
cmd_update_order.Parameters.Add(new SqlParameter("@code", SqlDbType.VarChar));
cmd_update_order.Parameters["@code"].Value = str;
str should be the datakey but it is not working
thanks
|
|
|
|
|
.netman wrote: DropDownList dr = (DropDownList)sender;
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values["code"].ToString();
You can not get CommandArgument here
Set that in ToolTip property of dropdownlist when you create evend handler of DDL
On RowCreatedEvent
DropDownList ddl=(DropDownList)e.Row.FindControl("DDLID");
ddl.ToolTip=gv.DataKeys[e.Row.RowIndex].Value;
Now on SelectedIndexChange event
DropDownList dr = (DropDownList)sender;
string keyID=dr.ToolTip
....
.....
please don't forget to vote on the post that helped you.
|
|
|
|
|
error:
Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)
ddl.ToolTip = GridView1.DataKeys[e.Row.RowIndex].Value; // gv is your gridview
it throws an error for this line
How do I convert?
|
|
|
|