|
thanks but I can't what u say?
Please provide some tutorial and sample for site map path control.
Thank You
|
|
|
|
|
Did you not click on the link. It is what you asked for. If that doesn't help then try using Google to search for what you want or, better, go read the documentation until you understand how to do it.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
What is ref and out and how to use in asp.net ?
Please explain with an example .
|
|
|
|
|
See the documentation[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
ref is used in vb.net and out is used in c#
like this
private sub add(byref a as int,byref b as int)
a=45
b=56
End Sub
example it is on
button click sub
add(a,s)
End Sub
|
|
|
|
|
hi
i have an error,
i have written a code to send an email.
the email was sent to private email address
like info@yourdomain.com
but the email was not sent to any
"gmail or yahoo mail address."
when i tried to sent an email to gmail or yahoo account the following error occurs,
"Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server."
here is my code :
protected void SendEmail()
{
SmtpClient smtpClient = new SmtpClient("mail.mydomain.com", 25);
MailMessage Msg = new MailMessage();
//------for Email Data----------------------------------
Msg.To.Add(TxtEmail .Text .Trim ());
Msg.From = new MailAddress("tehnical@mydomain.com");
Msg.IsBodyHtml = true;
//----Get Max userid------------------------------
string strConnection = ConfigurationManager.ConnectionStrings["AIGamesConnectionString"].ConnectionString;
SqlConnection MaxUserIdCon = new SqlConnection(strConnection);
MaxUserIdCon.Open();
string StrMaxUserId = "select max(id) as Id from users";
SqlCommand MaxUserIdComm = new SqlCommand(StrMaxUserId, MaxUserIdCon);
SqlDataAdapter MaxUserIdDa = new SqlDataAdapter(MaxUserIdComm);
DataSet MaxUserIdDs = new DataSet();
MaxUserIdDa.Fill(MaxUserIdDs);
MaxUserIdCon.Close();
int MaxUserId=1;
if (MaxUserIdDs.Tables [0].Rows.Count >0)
{
MaxUserId = Convert.ToInt32(MaxUserIdDs.Tables [0].Rows [0]["Id"].ToString ());
}
//------------------------------------------------
StringBuilder bodyMsg = new StringBuilder();
bodyMsg.Append("Thank you for creating your account.\n\nPlease follow this link to activate: ");
bodyMsg.Append("
Activate Your Account");
Msg.Body = bodyMsg.ToString();
//authentication--------------------------------------------------------------------------------
SmtpClient mySmtpClient = new SmtpClient();
System.Net.NetworkCredential myCredential = new System.Net.NetworkCredential("tehnical@mydomain.com", "password");
mySmtpClient.Host = "mail.mydomain.com";
mySmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
mySmtpClient.UseDefaultCredentials = false;
mySmtpClient.Credentials = myCredential;
//-------------------------------------------------------------------------------------------
mySmtpClient.Send(Msg);
LblMessage.Text = "An email for account verification has been sent,please check your email";
EmptyTextBoxes();
// ------for Email Data----------------------------------
}
|
|
|
|
|
|
You created 2 SmtpClient Objects, you must of mixed up the object that sends
You really should structure your code better, because that was a hard read. I don't see why you would build your message body via sql in the middle of your email function,
Why not build your html message first, and then pass the message to the smtp function, in which you set your parameters, and send the message.
You didn't attach the message (msg) to the smtp object, sloppy code will produce errors, that you can't see.
|
|
|
|
|
Try this:
MailMessage Msg = new MailMessage();
Msg.To.Add( new MailAddress(TxtEmail .Text .Trim ()));
Msg.From = "tehnical@mydomain.com";
Msg.IsBodyHtml = true;
Msg.Subject = "Login Details";
SmtpClient smtp = new SmtpClient();
smtp.Host = "mail.mydomain.com";
smtp.Port = 1234;
smtp.EnableSsl = GmailSSL;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential("tehnical@mydomain.com","password");
smtp.Send(Msg);
|
|
|
|
|
In a C# 2010 web form application that uses web form controls, I have a scrollbar used on a panel control. The user would like to be able to retain the scrollbar position while they are on the current web form page. They would like the scrollbar to retain its position until they have pointed to the next web form page. Since I do not know how to accomplish this goal, I am wondering how to accomplish this task.
The asp.net markup looks like the following:
<asp:Panel ID="Panel1" runat="server" ScrollBars="Auto" Height="130px" Width="455" CssClass="TextBoxStyle"> <asp:CheckBoxList ID="ChkBoxLst" runat="server" AutoPostBack="true"> </asp:CheckBoxList> </asp:Panel>
|
|
|
|
|
|
Thanks for your answer. However that did not work.
There is no postback involved most of the time.
Basically I placed a checkbox list control within a panel that has a scrollbar.
When the user has finished selecting all the items in the checkbox list control, they move on to other items on the web form page to enter. They have not clicked the 'next' button yet. There is no postback.
The user does not want the scrollbar to go to the top area of the scroll. They want to stay where they left off entering selections.
Thus do you know of other ways I can maintain the scrollbar position? I am currently not using ajax controls on this webpage.
|
|
|
|
|
|
I think what the OP is trying to say,
Is that he has a form with a checkbox in a tall panel with scrollbars set to auto. The user clicks on the checkbox, and it alters the form, and during the parital or whole page postback, the panel scroll position defaults back to the top.
How do I reset the scroll position to where the user left it, during a partial or whole page postback.
|
|
|
|
|
I guess I misunderstood this statement...
Quote: They have not clicked the 'next' button yet. There is no postback.
|
|
|
|
|
no your fine.
I'm still trying to understand the question. My rephrase was the only thing that made any sense.
It's like one of those detective shows, and you have to figure out the crime based on the written statement of the OP.
|
|
|
|
|
You are correct. This is what I am trying to say:
There has a form with a checkbox in a tall panel with scrollbars set to auto. The user clicks on the checkbox, and it alters the form, and during the parital or whole page postback, the panel scroll position defaults back to the top.
How do I reset the scroll position to where the user left it, during a partial or whole page postback.
|
|
|
|
|
|
Yah
I think I just posted the same link
Good job!
|
|
|
|
|
Thats too funny. Looks like you covered it a little better than I did though so good job to you!
|
|
|
|
|
Thanks,
I figured the question was wrong, and the OP had no clue what was happening there.
Well, hopefully, he learned something there today.
These asp.net questions are getting harder to answer because the way the questions are phrased make no sense to me.
One day, someone will ask a really good question
Over and out, time to sleep
|
|
|
|
|
Aw, The page lifecycle
OnInit, Intialize the html elements on the page
onLoad, load values for the html elements
once the page does onInit, the html elements are cast in stone, and will not change
Once the page does onLoad, you can populate values in the html elements
During a postback to the server, the html elements are rock solid, and the values will remain, but things like scroll position reset back to default. The page does not have the ability to remember little details like scroll position
MaintainScrollPosition is for the scroll of the whole page, and not a panel.
But, maybe, instead of page.MaintainScrollPosiiton, you could do panelName.MaintainScrollPosition
Other that that, you would have to take a measurement of the position, record it, and restore it back to the value, in theory
I don't have an answer, I would have to think about it and experiment.
A quick search gets this document.getElementById('box').scrollTop
Persisting the scroll position of a DIV on AJAX postbacks [^]
Maintain Scroll Position in Panel, Div[^]
http://michaelsync.net/2006/06/30/maintain-scroll-position-of-div-using-javascript-aspnet-20[^]
http://forums.asp.net/t/1359867.aspx[^]
|
|
|
|
|
dcof wrote: There is no postback involved most of the time.
dcof wrote: There is no postback.The user does not want the scrollbar to go to the top area of the scroll. T
Well, not possible! Without a postback, page would not return scroll to top by itself!
My answer still holds. Try out. Both the options. For second one, use form onsubmit() event to store the scroll position and then restore it on form load.
|
|
|
|
|
Use Smartnavigation = true property hope it will suits your requirement.
|
|
|
|