Anyone??
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
Anyone??
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
The problem Using itextSharp to convert an html file to pdf and emailing it, I am unable to successfully parse an html file on the web server backend even when doing "absolute" or "relative" image referencing itextSharp fails and says "unable to find file c:\my_image.jpg" this is crazy didn’t specify c:\my_image.jpg as a path !!! The madness of all this is it works well on my local file system, when the html file is located on asp.net using an IIS webserver i get the above described error. Here is my code. // Simple copy of the html  asp.net code behind private void SendEmail(string attachmentName, string pdfDocumentHtml, string mailSubject, string mailBody, MailAddress fromEmailAddress, List toMailAddressCollection) { Document doc = null; XmlTextReader reader = null; MemoryStream ms = null; MemoryStream msPdf = null; MemoryStream msHtml = null; try { /* Convert to PDF */ doc = new Document(PageSize.A4, 10, 10, 10, 10); msPdf = new MemoryStream(); PdfWriter.GetInstance(doc, msPdf); /* Create a pdf document listner to the memory data strean */ msHtml = new MemoryStream(new ASCIIEncoding().GetBytes(pdfDocumentHtml)); reader = new XmlTextReader(msHtml); reader.WhitespaceHandling = WhitespaceHandling.None; HtmlParser.Parse(doc, reader); ms = new MemoryStream(msPdf.ToArray()); /* Mail and add PDF as Attachment*/ var attachment = new Attachment(ms, new ContentType("application/pdf")); attachment.Name = attachmentName; attachment.NameEncoding = Encoding.UTF8; MailMessage email = new MailMessage(); email.From = fromEmailAddress; foreach (MailAddress address in toMailAddressCollection) { email.To.Add(address); } email.Attachmen
Problem solved :)
private void ReadASPCookie()
{
HttpCookie c = Request.Cookies["TestCookie"];
if (c != null)
lblName.Text = HttpUtility.UrlDecode(c.Values["shopperName"]);
}
Im not sure if HttpUtility.UrlDecode works for all special characters, but for now it solves my problem. :)
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
Hi all im stuck and really cant solve this one here goes... In asp ive got the following asp page that dumps a cookie with following name example "cronjé" when i read the name it reads fine after adding the nessary encoding type see below.
Dim Name, Result
Name = "cronjé"
Response.charset="utf-8" ' // important dont omit this.
Response.Cookies("TestCookie").Expires = Now + 60
Response.Cookies("TestCookie")("test") = "1"
Response.Cookies("TestCookie")("shopperName") = Name
Response.Cookies("TestCookie").Domain = "www.cookiemonster.com"
Result = Request.Cookies("TestCookie")("shopperName")
Response.Write(Result)
Output : "cronjé" this works fine as it dumps the cookie and reads it correctly no problem here. Using ie cookie viewer the value looks like this "shopperName=cronjé" My problem: Im maintaing a asp.net website that uses this cookie, when it reads it it does not display the name correctly.
private void ReadASPCookie()
{
HttpCookie c = Request.Cookies\["TestCookie"\];
if (c != null)
lblName.Text = c.Values\["shopperName"\];
}
the output displays the name as "cronj%C3%A9" i dont understand why its doing this :( i even tried doing the following with no result. in the web.config i added the following encoding. still nothing :(
<globalization
fileEncoding="utf-16"
requestEncoding="utf-16"
responseEncoding="utf-16"
/>
i even tried setting the Response.Charset = "utf-8"; still nothing :( Can someone plz help me ?
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
modified on Tuesday, July 22, 2008 4:43 AM
Hi Thank you all for a very informative response!From the noise generated I guess spending more time gaining experience is all I need to get though it, in the mean time I will build up a portfolio with products I have build in my time on this earth, that will be my road map and will bring not only confidence but satisfaction. Thank You People :)
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
Doesn’t certification influence salary increase?
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
Hi I have finally reached a stage in my career where i want to attain respect and confidence at my job. I have 3 years expr using c# i mainly deal with asp.net 2.0 and slowly working with 3.5 once in a while. My confusion is what exam should i go for ? :confused: MCTS ? MCP ? MCSD ? Can some please help me decide, Thanks in advance
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
Hi im having an issue with the DataList control not firing the ItemCommand event. here is my code : Snippet 1 (attempt : 1 does not work :( ) <asp:Literal ID="litSortBy" runat="server" Text="<%$ Resources:language_resource, sort_by %>" />: <asp:ListView ID="lvSort" runat="server" OnItemDataBound="lvSort_ItemDataBound" OnItemCommand="lvSort_ItemCommand" > <LayoutTemplate> <asp:PlaceHolder ID="itemPlaceHolder" runat="server" /> </LayoutTemplate> <ItemTemplate> <asp:LinkButton ID="lbtnSort" runat="server" /> <asp:Literal ID="litSpacer" runat="server" Text=" | " /> </ItemTemplate> </asp:ListView> Snippet 2 (attempt : 2 does not work :( ) // Manually registering the events in the codebehind still dont solve anything DataList.ItemCommand +=new EventHandler<ListViewCommandEventArgs>(lvSort_ItemCommand); // Here is the codebeind: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { BindDataListNavigationProducts(); GetNavigationInfo(); BindSortingOptions(); } } protected void lvSort_ItemCommand(object sender, ListViewCommandEventArgs e) { // Never ever gets here, why what going on here ????? } Can someone please offer an alternavtive solution or a work around this ? Thank you very much in advance. :-)
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
Can u show me an example please ? Thank You :)
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
Ive even found out that if one uses the following code block debugging does not always work ! // Dont always work ! function doSomthing() { // break point here } // Debugging works here function doSomthing() { // break point here }
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
Hi all Whats the difference between the following script includes ? <script type="text/javascript" src="script.js"> P.S Hardly got anything usefull from google. Thanks a million ! <div class="ForumSig">Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.</div>
Hi All What note book brand and why will you choose when working on heavy +/- 30 projects in a visual studio solution ? What is okay enough notebook and value for money ? Speed ? Ram ? Battery Life ? Hard Drive ? Screen size / Antiglare ? Regards :)
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
FileInfo o = new FileInfo("c:\\file.dat"); // o.Name // o.FullName // o.Extension // o.Extension // o.DirectoryName Does this help ??
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
Thank you that makes sense now, :)
Hi all, This week I’ve been doing research on wcf but I’m a bit confused heres my question .... If I have a wcf service with http transport containing a method called send mail that method uses system.net mail class to send email via smtp wont it be using the underlying mechanics to send an email using smtp via tcp. :confused::confused:
Can anybody tell me how to convert a .msg file to .eml file.using a .net component or some C# .net or even a COM libary. Thanks in advance.
Can anybody tell me how to convert a .msg file to .eml file.using a .net component or some .net / COM libary. :confused::confused: Thanks in advance.
i think this holds the answer to my problem. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1731662&SiteID=1[^]
Hi all, Problem --------- Im having a big issue when running a .net 2.0 exe developed in vb.net using vs 2005, from a "unc network share" that connects to a database on that server where the share resides on i get an error when executing a sql command. (SQL 2000 db) :confused: Ive checked the following. --------------------------------------------- 1) The folder as full access rights. 2) The connection string connects fine from my local pc as it has the connection to the db server. 3) im not using code access security when running the code. Thank you in advance. :rose:
Hi, I just started a new job being a OOP C#.NET programmer im forced to main a mission critial application using asp and com+. So dont feel too bad i feel for u buddy :-)