|
System.Web.Mail
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Private Shared Sub Send(ByVal smtpServer As String, ByVal fromEmail As String, ByVal subject As String)
Dim strBody As String
Dim smtpMail As System.Web.Mail.SmtpMail
Dim mailMessage As New MailMessage
mailMessage.From = fromEmail
mailMessage.To = _emailAddress
mailMessage.Subject = subject & " - " & _status
strBody = ""
strBody += ""
strBody += ""
strBody += ""
strBody += ""
strBody += ""
strBody += "" & "Order Details" & " | | " & "Ordered:" & " | " & _orderDate & " | | " & "Due Date:" & " | " & _dueDate & " | | " & "Refrence #:" & " | " & _referenceNumber & " | | " & "Borrower:" & " | " & _borrowerName & " | | "
mailMessage.Body = strBody
'Set the message properties.
mailMessage.BodyFormat = MailFormat.Html
smtpMail.SmtpServer = smtpServer
Try
smtpMail.Send(mailMessage)
Catch ex As Exception
Throw New AtlasApplicationException("VMS.COM.001")
End Try
mailMessage = Nothing
End Sub
Hope his helps
Chinna Srihari
Tech Lead, Capgemini
|
|
|
|
|
Hi,
The Page_Load event fires in two situations:
1. When the page is rendered from the server to the client.
2. When the client Posts Back the form.
How can I know which action fired the Page_Load event?
IsPostBack doesn't work because after the initial rendering of the page from the server to the client, IsPostBack is always true.
I need to know because my application generates controls dinamically using only one form. Therefore every roundtrip that generate controls will always have IsPostBack true after the first rendering.
Example:
First page rendering -> controls are generated dinamically
Postback -> read the controls values and generate new ones
Second page rendering -> show the new controls
(at this moment, even though the server is rendering a page with completely
different controls, IsPostBack is true because the webform
is the same. That's why I cannot use IsPostBack to determine if the
Page_Load event was fired by a rendering or by a client post)
Postback -> read the controls values and generate new ones
...
TIA
|
|
|
|
|
Hi there,
Generally speaking, the Page_Load event get fired every time the page is visisted including the first time and postback. When you work with the dynamic control, you should remember that you need to reinsert it on postback if you want to read the value from it or you still want to see it on the web form. More importantly, you need to add it before the ViewState is loaded and postback data is processed. In this case, you should not use the IsPostBack property to check if you need to readd the dynamic control, instead you may consider using the ViewState to persist the name/url of the dynamic control that you are using. And this ViewState item tells you which control you should add to the control hierarchy so that you can read the control value. For more information, you can see ASP.NET Page Life Cycle Overview [^]
|
|
|
|
|
i know nothing about how install that backtalk
i neeed someone can do it for me and work with me
all i neeed is install a conference called backtalk from this website http://www.unixpapa.com/backtalk[^]
i want to install it into my space
plz anyone can help email me in Ksar@Menara.ma
|
|
|
|
|
I have a textbox and I want to allow admins to put html inside the textbox, but VS2005 freaks every time. what tag do I use for the page to tell 2.0 thats its okay on that page only.
thanks,
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
This kind of resolution[^] doesn't apply to .net 2005 anymore?
daniero
|
|
|
|
|
Set the following setting for the Page directive
You can disable request validation by setting validateRequest=false
Chinna Srihari
Tech Lead, Capgemini
|
|
|
|
|
Hello all,
How to prepare a combined setup using .NET 2.0, In this I want to Execute first SQL Scripts, Web Service Setup, Web Application Setup and Windows Service Setup.
Is this possible using .NET Setup?, if yes how to do this?
any body any sounds or any suggestions or articles?
plz help me.
regards
GV Ramana
-- modified at 15:46 Tuesday 9th May, 2006
|
|
|
|
|
why dont we traditionally use files when dealing with internet applications?
|
|
|
|
|
What do you mean by that?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Has anyone found code for dynamic breadcrumbs? What I mean it that it displays where the use actually came from, not the directory structure. I found one article by Mark Angeletti for ASP.NET Breadcrumbs in C# but he doesn't explain a snippet of code and I can't figure it out. Using c#.
|
|
|
|
|
|
Okay...the code. I originally created BreadCrumbs.cs
Next, created BreadCrumbs.ascx and BreadCrumbs.ascx.cs
Finally, the article said to put the following in the code behind in each .aspx page
**code behind for .aspx***
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Sabre_Solutions.Loads.Topographic_Effects
{
///
/// Summary description for BreadCrumbTest.
///
public class BreadCrumbTest : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Literal lblPageTitle;
protected NameSpace.headerBreadCrumb header;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
string PageTitle = "Test the Title";
lblPageTitle.Text = PageTitle;
headerBreadCrumb.HeaderText = PageTitle;
}
}
***end code***
The bolded two lines are what are confusing me. I am apparently supposed to declare another class of headerBreadCrumb but I have no idea what to include in the code itself.
|
|
|
|
|
Hi all,
I want to play my audio,video data from database to custom player like media player,without saving option in C# asp.net webform.Any body having ideas or free source code please reply back as early as possible.
regards
sastry.
venkat
|
|
|
|
|
Hi,
If i create a session or cookie within a web service, will the session / cookie be created on the consuming pc or on the system hosting the web service?
Thanks for any info
munklefish
|
|
|
|
|
Looks like you cant do
Response.Cookies in a web service anyway.
|
|
|
|
|
Does anyone know if it possible to implement Web Parts in ASP.NET 2.0 such that it is possible to move them from one web part zone to another without reloading the page each time, as is the case with sharepoint?
Thanks
|
|
|
|
|
Hi,
I get an xml string and now I would like to read the value of one of the elements in this xml string.
Please note that I would like to read an xml string not an xml file.
In this example let's say i would like to get the value for <wardcode>
Thanks
"
<postcodes xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<postcodeitem>
<containsmostlikelymatch>false
<postcode>HA53TN
<wardcode>00AQGL
<postcodepossiblegeographiesdataset>
<postcodepossiblegeographies>
"
|
|
|
|
|
The XmlDocument.LoadXml[^] method allows to load the xml document from a specified string, then you can read the value of a particular node.
|
|
|
|
|
Hii,
I am trying to parse the innerHTML from a treeview like this...
//InnerHTML = "<INPUT id=TreeViewPR1_TreeView1n14CheckBox title=Hostage type=checkbox CHECKED name=TreeViewPR1_TreeView1n14CheckBox>
//<SPAN class=\"TreeViewPR1_TreeView1_0 TreeViewPR1_TreeView1_1\" id=TreeViewPR1_TreeView1t14 title='Extract This string'>Hostage</SPAN>"
function AddNodeid(InnerHTML)
{
var TitleIndex=InnerHTML.lastIndexOf("title=");
if (TitleIndex > 0)
{
var SubString= InnerHTML.substring(TitleIndex+6, InnerHTML.length+1);
var EndIndex=SubString.indexOf("id="); // For Firefox
if(EndIndex <=0)
EndIndex=SubString.indexOf(">"); // For IE
var Nodeid=SubString.substring(0, EndIndex);
alert(Nodeid);
}
else
alert("No NodeId");
}
the problems are becoz of browsers..
Firefox interchanges the positions of title and id in <SPAN> tag...
and another prob with this code is that IE returns id without quotes( i.e 01) but FF returnsin double quotes(i.e "01").
can you tell why this happens and is there a way by which I can directly get
title, value pair.
Cheerio
Abhishek
-- modified at 10:08 Tuesday 9th May, 2006
|
|
|
|
|
Hi,
I have a data grid with check boxes by which we can select the rows in the grid. I want to get the data in the selected row. How can i achieve this.
Thanks,
Jaikrishna
|
|
|
|
|
This is a good source[^] for information related to datagrids, you can look there.
daniero
|
|
|
|
|
Hi,
I'm struggling with the split function of ASP. I'm using Dreamweavers ASP, Javascript.
The string looks like this:
+ 'test=1L1S1=INSERT INTO SHIFTDEFINITION (SHIFT,DATACOLUMN,DATAVALUE,DATATYPE,FIELDDESCRIPTION,LINENO,SEQNO,COMPANY) VALUES ('ABC' + , + 'NTSTART' + , + '15:30' + , + 't' + , + 'Start Time', + 1,1, + 'ASP')L1S2=INSERT INTO SHIFTDEFINITION (SHIFT,DATACOLUMN,DATAVALUE,DATATYPE,FIELDDESCRIPTION,LINENO,SEQNO,COMPANY) VALUES ('ABC' + , + 'NTEND' + , + '16:30' + , + 't' + , + 'End Time', + 1,2, + 'ASP')L1S3=INSERT INTO SHIFTDEFINITION (SHIFT,DATACOLUMN,DATAVALUE,DATATYPE,FIELDDESCRIPTION,LINENO,SEQNO,COMPANY) VALUES ('ABC' + , + 'CHANGEDBY' + , + 'RICHARDB' + , + 'S' + , + 'Changed By', + 1,3, + 'ASP')
As you can see there is sql in the string. The L1S1 stands for LineNo 1 and SeqNo 1 and so on, because I'm building the HTML dynamically. There is a variable called id which runs though a loop and builds the id example. var id = ("L"+x+"S"+y);
I get the string from a hidden field in the HTML called "hide". The hidden field was populated with a javascript function that reads the sql out of a cookie passed on from another page.
Then I use the split function to extract the sql from the string to execute it.
And this is what I have tried so far with no success:
<%
var WordArray= new Array(11);
var THESQLString = new Array(11);
THESQLString = Request.Form("hide");
// with loops in this statement
WordArray[y] = THESQLString[y].split(id);
All I receive is an error saying: Object Expected or WordArray[y] is null or not an object
The en result must look something like this (for each Lines SeqNo):
INSERT INTO SHIFTDEFINITION (SHIFT,DATACOLUMN,DATAVALUE,DATATYPE,FIELDDESCRIPTION,LINENO,SEQNO,COMPANY) VALUES ('ABC' + , + 'CHANGEDBY' + , + 'RICHARDB' + , + 'S' + , + 'Changed By', + 1,3, + 'ASP')
Thanx alot if someone can Help me
Richard a.k.a Programm3r
|
|
|
|
|
sir,
i want to display the pictures in new window with its original size. I am using Datalist in which pictures are in small size i want to display these photos 0n mouse click in its original size in new window
please help me
|
|
|
|
|