|
Yes ,
I dont have JRE in my VPC.It must be false..
|
|
|
|
|
hi..
I m using following function for mailing functionality.
using System.Net.Mail; // for mailing functionalities
private void SendMailToUser()
{
/* Sending Email To Users About Registration Confirmation --START*/
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
string toMail = txtEmail.Text.Trim();
message.To.Add(toMail);
message.Subject = "bla_bla - Registration Confirmation";
message.From = new System.Net.Mail.MailAddress("bla.admin@gmail.com");
string MainBody = "Dear " + txtFName.Text.ToString() + "," + "\r\n";
MainBody = MainBody + "Thank you for registering in bla.com " + "\r\n<br/>";
MainBody = MainBody + "http://www.bla.com" + "\r\n<br/><br/><br/>";
message.BodyEncoding = System.Text.Encoding.GetEncoding("utf-8");
System.Net.Mail.AlternateView plainView = System.Net.Mail.AlternateView.CreateAlternateViewFromString
(System.Text.RegularExpressions.Regex.Replace(MainBody, @"<(.|\n)*?>", string.Empty), null, "text/plain");
System.Net.Mail.AlternateView htmlView = System.Net.Mail.AlternateView.CreateAlternateViewFromString(MainBody, null, "text/html");
message.AlternateViews.Add(plainView);
message.AlternateViews.Add(htmlView);
System.Net.NetworkCredential cred = new System.Net.NetworkCredential("bla.admin@gmail.com", "admin1234");
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com");
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
smtp.Credentials = cred;
smtp.Port = 587;
message.Body = MainBody;
smtp.Send(message);
message.Priority = MailPriority.High;
/* Sending Email To Users About Confirmation --END*/
}
/////////////////////////////
Now this was ok when i m using gmail service for sending mail from my application,
But i want to use my domain's mail a/c for sending email, but it does not work, gives failure .
can u tell me what changes do i need to make... say my domain is bla.com.
And my email id is "customerservice@bla.com".
thanks
hemant
By:
Hemant Thaker
|
|
|
|
|
Hemant Thaker wrote: gives failure .
What is the error message?
Best wishes,
Navaneeth
|
|
|
|
|
Failure sending mail
By:
Hemant Thaker
|
|
|
|
|
more technical
System.Net.WebException: The remote name could not be resolved: 'smtp.blaaa.com' at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message)
hemant
By:
Hemant Thaker
|
|
|
|
|
I think smtp.blaaa.com couldnt be reached by SMTP client.
|
|
|
|
|
Hi
I am using two HTML radio buttons
<td align="left" style="height:40px;vertical-align:middle " >
<input type="radio" id="rdoLeaveExcHoliday" value="1" name="rdoLeaveOption" onclick=" SelectLeaveType(this,'1');" />Leaves-excluding holidays and weekends
<input type="radio" id="rdoLeaveIncHoliday" value="2" name="rdoLeaveOption" onclick=" SelectLeaveType(this,'2');" />Leaves-including holidays and weekends
</td>
I want to make second radio button invisible if my dataset in code behing returns zero. I canot make them runat="server"
How to get it? Any help will be appreciated..
Thanks in advance
Inderjeet Kaur
Sr. Software Engg
|
|
|
|
|
Hi
There are two things you have to do.
(1) Edit the HTML code to include the attribute runat="server" in the
opening tag of the HTML control. For example for a table it might be:
<TABLE id="Table1" ...(other attributes) ... runat="server">
(2) Then you need to include the namespace "System.Web.UI.HtmlControls"
in the code behind (e.g. in VB the directive Imports
System.Web.UI.HtmlControls).
If you are using Visual Studio then you will find that it will become
available in auto-complete under the identifier (in the example above)
Table1.
With that you will be able to program it's behaviour in a very similar
manner to web Server controls.
Hope that helps!
Deepak Surana
|
|
|
|
|
hi im retrieving data using data reader from database.
ArrayList AlYear = new ArrayList();
int i;
for (i = 2002; i <= 2007; i++)
AlYear.Add(i);
DropDownList1.DataSource = AlYear;
DropDownList1.DataBind();
Session["startdate"] = dr["startdate"];
and the posting this value to other page...
DropDownList1.SelectedItem.Text = Session["startdate"].ToString();
everything worked till here.
but while updating
for ex: DropDownList1.SelectedItem.Text is 2002(retrieved from database)
the 1st list item is disappeared... and when i click to update it to other than 2002 that list item is also changed to 2002....
|
|
|
|
|
You may be binding the dropdown on page_load without checking Page.IsPostBack .
Best wishes,
Navaneeth
|
|
|
|
|
im binding by checking post back
if (!this.IsPostBack)
{
ArrayList AlYear = new ArrayList();
int i;
for (i = 2001; i <= 2007; i++)
AlYear.Add(i);
DropDownList1.DataSource = AlYear;
DropDownList1.DataBind();
|
|
|
|
|
I have noticed that when a column is set to invisible then its cell cannot be retrieved. Number of cells reduce
|
|
|
|
|
Dont set it to invisible at design time. let it show, but on RowDatabound Event set its visibility to false and you will be able to retrieve it.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
|
hi u can just try this out
first create a session variable and assign it the value of id like on your signin button
Session["variable-name"]=id
if u having id in a text-box so u can wright like this
i am going to make an variable for id u can declare same like this
Session["id"]=textbox1.text
and on next page where u want to display information from this id
create a variable define its data-type wht u have in id and assign its to like this
i have chosen the data-type string
string id=Session["id"].ToString();
and pass this variable value to youre query
thats all
|
|
|
|
|
Can u tell me the solution of this problem?
I am using GridView control to display data from AccessDataSource.
Is it also possible to edit the data in GridView Control while running the application?
Can I insert, delete and update data in the databse using these 2 controls?
One more thing I want to ask is:
I want to add one column in which I want to show a checkbox. and I want to update it while running in database.
plz help me as I am a newbie.
thanks
modified on Tuesday, October 27, 2009 3:13 AM
|
|
|
|
|
I recently upgraded an ASP.NET project from 2.0 to 3.5 framework, and I've had problems with my web deployment project ever since.
It no longer copies over existing files with the latest version. To remedy this problem I have had to manually uninstall the previous version before installing the latest version.
I tried removing the deployment project and creating a new one from scratch after the 3.5 upgrade, but have had no luck.
Has anyone else had this problem? I'm really baffled.
I'm tempted to create a custom action that will manually delete all files and subfolders before installing. Any other suggestions before I go down that path?
Jordan
|
|
|
|
|
Jordan Marr wrote: Any other suggestions before I go down that path?
Sometimes a clean install is a better idea anyway, but make sure you have backed everything up before deleting.
|
|
|
|
|
Hello all
I am working on my one of my assignment to create ASP.NET AJAX project it's simple with one default.aspx page and on the middle of page there is one updatepanel and inside UpdatePanel there is on ImageBox and one Timer
I have one Image folder and there are 16 images and i want to display image in to imagebox in order from 1 to 16 and after 16th image it goes to image 1 and so on this is what i have done so far and it's working ok but still i want to do some thing in it
Dim MyImage(15) As String
Private Sub GetImages()
MyImage(0) = "1.png"
MyImage(1) = "2.png"
MyImage(2) = "3.png"
MyImage(3) = "4.png"
MyImage(4) = "5.png"
MyImage(5) = "6.png"
MyImage(6) = "7.png"
MyImage(7) = "8.png"
MyImage(8) = "9.png"
MyImage(9) = "10.png"
MyImage(10) = "11.png"
MyImage(11) = "12.png"
MyImage(12) = "13.png"
MyImage(13) = "14.png"
MyImage(14) = "15.png"
MyImage(15) = "16.png"
End Sub
Sub GetNextImage(ByVal Src As Object, ByVal Args As EventArgs)
'Retrieve the array from view state
MyImage = ViewState("PictureArray")
'Increment the image counter
ViewState("Counter") += 1
If ViewState("Counter") > 15 Then
ViewState("Counter") = 0
End If
'Assign the next image to the control
BannerImage.ImageUrl = MyImage(ViewState("Counter"))
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
'--Load as array with image ursl and save to view state
Call GetImages()
ViewState("PictureArray") = MyImage
'--Establish a counter to keep track of the array index
ViewState("Counter") = 0
BannerImage.ImageUrl = MyImage(ViewState("Counter"))
End If
End Sub
and HTML is like
<asp:UpdatePanel ID="BannerUpdatePanel" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer2" />
</Triggers>
<ContentTemplate>
<asp:Timer ID="Timer2" runat="server" Interval="250" OnTick="GetNextImage">
</asp:Timer>
<br />
<asp:Image ID="BannerImage" runat="server"
ImageUrl="~/Globe/1.png" />
</ContentTemplate>
</asp:UpdatePanel>
Now it's working ok but Imabebox flash too much and in the bottom left corner of web page it's keep showing downloading image url so how can i solve it and also it only flash when it change to next image and last is this the right way to do this or is there better way to do it.
Thank you
|
|
|
|
|
Really you don't even need AJAX to do this, simple JavaScript will handle this
var imageNum = 1;
setInterval(changeImage, 250);
function changeImage()
{
if( imageNum >= 16 )
imageNum = 1;
img.src = "http:\\mysite\" + imageNum + ".png";
imageNum++;
}
only two letters away from being an asset
modified on Tuesday, October 27, 2009 7:55 AM
|
|
|
|
|
Hello sir
Thanks for your rep.
sir I dont know JS and C# so any other help
I have tried to change this to vb but i am bit strugling with 2 things
1- setInterval(changeImage, 250);
2- img.src =
waiting for your kind rep.
thanks
|
|
|
|
|
bapu2889 wrote: sir I dont know JS and C# so any other help
You should buy some books and read them
bapu2889 wrote: I have tried to change this to vb
NONE of it is C#, it is javascript and cannot be changed to VB. Use it exactly as is.
Buy a book. Please.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
A slight modification :
var imageNum = 1;
setInterval("changeImage()", 250);
function changeImage()
{
if( imageNum >= 16 )
imageNum = 1;
imageNum = parseInt(imageNum) + 1;
img.src = "http:\\mysite\" + imageNum + ".png";
}
Use this javascript to your page inside <script> tag.
|
|
|
|
|
Thanks for your rep.
but still I am not getting any ware
as i dont know JS i copy and past between code but there are blue lines and i my assignment is asp.net using visual basic
waiting for your kind rep.
have a nice day
|
|
|
|
|
<html>
<script>
var imageNum = 1;
setInterval(changeImage, 250);
function changeImage()
{
if( imageNum >= 16 )
imageNum = 1;
img.src = "http:\\mysite\" + imageNum + ".png";
}
</script>
<body>
etc
You have been given everything you need. Now, you really need to pick up a book and learn something about html and javascript on your own.
only two letters away from being an asset
|
|
|
|