|
reogeo2008 wrote: entry should validate to ensure that it is in 'www.somtext.co/in/something'
Do you want to validate the input format or validate whether the website exist? Regular expression can be used to validate the website format. Website existence can be checked by giving request to it.
|
|
|
|
|
Regular expression that can be used to validate the website format
|
|
|
|
|
|
Hi there,
I am populating a tree node by taking values from database.There are three main nodes and under that main node there are sub nodes which are the names of my forms.On click of that sub node I want to open that form as well as I want take name of the node which user had clicked.Can anybody tell me how to do this.I am using Asp.Net 2.0 and C#.net
Thanks.
modified on Tuesday, January 6, 2009 2:15 AM
|
|
|
|
|
On the SelectedNodeChanged even get the SelectedNode.Text of the treeview and redirect to that form.
|
|
|
|
|
Hello Friend,
i am using VS2008. and i want to use Ajax control on dropdown.please suggest me how i will use ajax in the control...
Raushan
|
|
|
|
|
do u have AJAX control toolkit this time . if not u can download from google
|
|
|
|
|
|
go to this link and download ajax control toolkit. install it and try.
http://www.asp.net/ajax/downloads/
|
|
|
|
|
raushan_9 wrote: Ajax control on dropdown
What it means? If you have added reference to AJAX toolkit, you can see the controls on toolbox. Pick the required one and use it.
|
|
|
|
|
raushan_9 wrote: i am using VS2008. and i want to use Ajax control on dropdown
Do as Navaneeth suggested or use UpdatePanel put Dropdownlist inside updatepanel.
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Hi ,
iam using webpartcontrols in .net 2.0.
i want to remove or hide minimize,edit,close,delete buttons in webpart control.
plz give me solution.
|
|
|
|
|
To hide the Close verb use
CloseVerb-Visible="false"
The same will for edit verb will be
EditVerb-Visible="false"
|
|
|
|
|
hi ,
i want to display minimize button only its displaying in i.e.minimize button is not working in firefox.
plz help me
|
|
|
|
|
Hi,
I am using gmail smtp for sending Emails and using this code :
// For sending Mail done by Nidhi on19sep08
public bool SendMail1(DataTable dt, string path)
{
string ToMail1 = "";
string UserName = "";
bool status = false;
int count = 0;
try
{
if (dt.Rows.Count > 1)
{
for (int i = 1; i <= dt.Rows.Count - 1; i++)
{
if (count == 0)
{
if (dt.Rows[0]["email"].ToString() != "")
{
ToMail1 = dt.Rows[0]["email"].ToString();
UserName = dt.Rows[0]["username"].ToString();
count = 1;
}
}
if (dt.Rows[i]["email"].ToString() != "")
{
ToMail1 = ToMail1 + "," + dt.Rows[i]["email"].ToString();
UserName = UserName + "," + dt.Rows[i]["username"].ToString();
}
}
}
else
{
if (dt.Rows.Count > 0)
{
if (dt.Rows[0]["email"].ToString() != "")
{
ToMail1 = dt.Rows[0]["email"].ToString();
UserName = dt.Rows[0]["username"].ToString();
}
}
}
if (dt.Rows.Count > 0)
{
bool mailSent = false;
SendMail objClsSendmail = new SendMail();
DataTable dtsmtpserver = objClsSendmail.getMailSetting();
int Port = Convert.ToInt32(dtsmtpserver.Rows[0][2].ToString());
string host = dtsmtpserver.Rows[0][1].ToString();
string User = dtsmtpserver.Rows[0][3].ToString();
string Password = dtsmtpserver.Rows[0][4].ToString();
MailAddress from = new MailAddress(dtsmtpserver.Rows[0][10].ToString());
MailAddress to = new MailAddress(ToMail1);
MailMessage msg = new MailMessage(from, to);
SqlConnection myConnection = new SqlConnection(SqlConnectionString.GetConnectionString());
SqlDataAdapter ad = new SqlDataAdapter("SELECT email FROM at_user where IsAdmin=1", myConnection);
DataTable ds = new DataTable();
ad.Fill(ds);
for (int k = 0; k <= ds.Rows.Count - 1; k++)
{
string[] id = ds.Rows[k][0].ToString().Split(',');
msg.CC.Add(id[0]);
}
string[] strUser = ToMail1.Split(',');
for (int j = 1; j < strUser.Length; j++)
{
msg.To.Add(strUser[j]);
}
if (path != "")
{
Attachment atcFile = new Attachment(path);
//***************Updated Code*********************
msg.Attachments.Add(atcFile);
}
// Subject
// msg.Subject = ddlProject.SelectedItem.Text.ToString()+"Post By" + Session["FirstName"].ToString() + " " + Session["LastName"].ToString();
msg.Subject = ddlProject.SelectedItem.Text.ToString() + " : " + ddlSubject.SelectedItem.Text + " (" + Session["FirstName"].ToString() + " " + Session["LastName"].ToString() + " )";
// Html message body
msg.IsBodyHtml = true;
msg.Body="<html><head> <title>Communication</title>";
// msg.Body=msg.Body+" color: #0A246A; padding:10px 0px 10px 10px;} .Regards{ font-weight: bold;color: #0A246A;";
// msg.Body=msg.Body+" padding:10px 0px 10px 10px; } a {color:#0077bd;} td {font-size: 14px; } </style>";
msg.Body=msg.Body+"</head><body > <table cellpadding='0' cellspacing='0' align='left' style='FONT-SIZE: 11px; FONT-FAMILY: Arial;width:800px; >";
msg.Body=msg.Body+"<tr><td rowspan='2' width='10'></td><td></td> </tr> ";
msg.Body=msg.Body+"<tr><td><table cellpadding='0' cellspacing='0' width='100%'>";
msg.Body = msg.Body + "<tr><td colspan='2'><p>";
//msg.Body = msg.Body + "<tr><td colspan='2'><div class=salute>Dear " + UserName + ",<p>";
msg.Body=msg.Body+ txtMessage.Value+"</p> </td> </tr>";
msg.Body = msg.Body + "<tr rowspan='2'><td></br></br><div> <div> Posted by</div> ";
msg.Body=msg.Body+"<div>"+Session["FirstName"].ToString() + " " + Session["LastName"].ToString();
msg.Body=msg.Body+" on "+ System.DateTime.Now.ToString()+"</div> </div> </td></tr> ";
msg.Body=msg.Body+ "</table></td></tr></table></body></html>";
//assigning Priority
msg.Priority = MailPriority.High;
SmtpClient client = new SmtpClient(host, Port);//
//client.UseDefaultCredentials = false;
client.EnableSsl = true;
// System.Net.NetworkCredential theCredential = new System.Net.NetworkCredential("excellent", "m49q3r");
System.Net.NetworkCredential theCredential = new System.Net.NetworkCredential(User, Password);
client.Credentials = theCredential;
Console.WriteLine("Sending an e-mail message to {0} by using the SMTP host{1}.", to.Address, client.Host);
client.Send(msg);//Sending the mail..
}
status = true;
//**********************************************************
}
catch (Exception ex)
{
status = false;
return status;
throw ex;
}
finally { }
return status;
}
I am using this xml for getting detail about SMTP setting
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<MailSetting id="mailSettingInfo">
<Smtpauthenticate>1</Smtpauthenticate>
<SmtpServer>smtp.gmail.com</SmtpServer>
<SmtpPort>587</SmtpPort>
<Sendusername>abc@gmail.com</Sendusername>
<Sendpassword>123</Sendpassword>
<ProxcyServer />
<ProxcyUser />
<ProxcyPassword />
<ProxcyPort />
<ProxcyAuthenticate />
<FromMailID>xyz@gmail.com</FromMailID>
</MailSetting>
Now there is no problem in sending mail but there is one problem that when mail limit exceed its limit(perhaps it is 500/day) then it block sending mail for 24 hours.
Do any one have other idea to do this.
Thanx in advance
|
|
|
|
|
try with other smtp server except google
|
|
|
|
|
How to do that,i mean is there is any surety that using other smtp server we will not get authentication problem.
|
|
|
|
|
i think so but not sure u can try by defining another SMTP.u r software developer ??
|
|
|
|
|
Yes i m s/w developer,we have our own smtp server but i am getting problem while using it ,perhaps there is some problem in network setting,or may be problem in my code,so i need code for sending mail except than gmail smtp way.
|
|
|
|
|
|
i think it is ur networking problem . contact with ur network with this issue.
|
|
|
|
|
Hi friends i have done following coding for making a simple guestbook.where i define Name,Email , Location and meesage . I want to store all the values in database when i click on button . i dont know how to do this . coz im new in programming. plz reply me on manvikaur2@gmail.com. if anyone knows .
----------------------------------------------------------------------------
<title>Guestbook.NET
----------------------------------------------------------------------------
i try to connect with SQL server 2005 after creating the table. but not able to done this .
|
|
|
|
|
jasjit 007 wrote: i try to connect with SQL server 2005 after creating the table. but not able to done this .
Why ? What problem are you getting ? Did you tried with google ?
cheers,
Abhijit
|
|
|
|
|
hi sir ,
i think u r not understanding the prob.i want to make a assignemt . when i click on button all the data will be store in SQL sever 2005 . i have created the web.config file where i define the connection string. now how to define the table.but im not able to do this .plz run the code in microsoft visual studio if u have
Thanks
Jasjit
|
|
|
|
|
I think u need to add runat="server" on input type control...
|
|
|
|