|
Set IsBodyHtml=True for the MailMessage Object and use the HTML tags for the formatting.
|
|
|
|
|
Hi,
Thanks a lot.
this is my code.
try
{
client.Host = ConfigurationManager.AppSettings["MailServer"];
string subject = "Applying a Request on : " + requestDate;
string body = @" To Date : " + requestDate + LineBreak + " Request
Details : " + request + LineBreak + " Employee Name : " +
userName + LineBreak + " Applied Date : " +
DateTime.Now.Date.ToLongDateString();
MailMessage mailMessage = new MailMessage(requestApplicationImp.UsrEmailId,
requestApplicationImp.MgrEmailId,subject, body);
client.Send(mailMessage);
}
In the above code, i want to make To Date, Request Details... to be in bold.
Please help me.
Regards,
R. Sangeetha Priya
Prya
|
|
|
|
|
aaraaayen wrote: try
{
client.Host = ConfigurationManager.AppSettings["MailServer"];
string subject = "Applying a Request on : " + requestDate;
string body = @" To Date : " + requestDate + LineBreak + " Request
Details : " + request + LineBreak + " Employee Name : " +
userName + LineBreak + " Applied Date : " +
DateTime.Now.Date.ToLongDateString();
MailMessage mailMessage = new MailMessage(requestApplicationImp.UsrEmailId,
requestApplicationImp.MgrEmailId,subject, body);
client.Send(mailMessage);
}
client.Host = ConfigurationManager.AppSettings["MailServer"];<br />
string subject = "Applying a Request on : " + requestDate;<br />
string body = @" <b>To Date :</b> " + requestDate + LineBreak + " <b>Request <br />
Details :</b> " + request + LineBreak + " Employee Name : " + <br />
userName + LineBreak + " Applied Date : " + <br />
DateTime.Now.Date.ToLongDateString();<br />
<br />
MailMessage mailMessage = new MailMessage(requestApplicationImp.UsrEmailId,<br />
requestApplicationImp.MgrEmailId,subject, body);<br />
mailMessage.IsBodyHtml=True;<br />
client.Send(mailMessage);
This should work...
|
|
|
|
|
Hi Venkatesh,
Thank you so much its working
Regards,
Prya
|
|
|
|
|
You are most welcome, Priya...
|
|
|
|
|
Hello Sir,
How are you could you please try for this, if possible please. I am struck
over here.
I have created a windows forms control in which I put a DSO Framer control. I have compiled it and registered in GAC. Even its doing fine when I used it in another windows application. But When I try to put it in a web page its not showing anything as it is the same thing showing the required word doc in windows application.
Please tell me what are the steps do I need to take to make it fine. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi,
I am creating a portal application where I have a Header with Menu control, an image behind the main page's background and a footer containing Home, Logg off links at bottom. In between there is a child container where in other child pages using this master page open.
Now what happens is that according to the content height of the child page, the master pages footer moves upwards keeping space at bottom. How to avoid this ? Pls guide me..
Pasted below is the Master page's HTML code and the css being used
<b> master page's contents</b>
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>HIS Knowledge Bank</title>
</head>
<link rel="stylesheet" type="text/css" href="StyleSheets/HISStyles.css" />
<body background="Images/All Page's Background.png" bottommargin="0">
<form id="form1" runat="server">
<div id="headerTop">
<table id="tblMaster" style="width: 100%; height: 30%">
<tr>
<td style="width: 100%" height="58px" background="Images/All Page's Header.png" align="right">
</td>
</tr>
<tr>
<td align="left">
<asp:Menu ID="mnMaster" runat="server" Orientation="Horizontal" PathSeparator=","
Width="100%" ForeColor="White" Font-Bold="true" Font-Names="Verdana" DynamicEnableDefaultPopOutImage="true"
StaticEnableDefaultPopOutImage="true" StaticPopOutImageUrl="~/Images/MenuArrowBlue.gif"
DynamicPopOutImageUrl="~/Images/MenuArrowBlue.gif" StaticSubMenuIndent="10px"
DisappearAfter="50" DynamicVerticalOffset="2">
<DynamicMenuStyle BackColor="#DFF6FD" ForeColor="#066684" BorderColor="" BorderStyle="Solid"
BorderWidth="2" />
<StaticMenuStyle CssClass="Menu" />
<StaticHoverStyle CssClass="StaticHoverStyle" />
<DynamicSelectedStyle ForeColor="#FFFFFF" />
<DynamicHoverStyle CssClass="DynamicHoverStyle" ForeColor="#FFFFFF" />
<DynamicMenuItemStyle ForeColor="#066684" HorizontalPadding="5px" VerticalPadding="2px" />
</asp:Menu>
</td>
</tr>
</table>
</div>
<div id="contentMain">
<table id="TableChild" style="width: 100%">
<tr height="100%">
<td style="width: 100%">
<asp:ContentPlaceHolder ID="cntrPlHldMasterPage" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</div>
<div id="footer">
<table id="TableFooter" style="width: 100%; text-align: center">
<tr>
<td bgcolor="#0B8DC7" style="width: 100%; height: 20px" align="center">
<font size="2" color="White" style="font-family: Verdana"><a href="Default.aspx"><font
color="white">HOME</font></a> | <a href="http://www.hexaware.com/abt.htm" target="_blank">
<font color="white">ABOUT US</font></a> | <a href="mailto:admin@hexaware.com"><font
color="white">CONTACT US</font></a> |<font color="white">
<asp:LinkButton runat="server" ID="lnkLogOff" Text="LOG OFF" OnClick="lnkLogOff_Click"
CssClass="HYPERLINKBUTTON" ForeColor="White"></asp:LinkButton></font>
<font style="font-size:smaller; font-weight:bold" >
<asp:HyperLink runat="server" ID="lnkHexCapabilities" Text="HEXAWARE CAPABILITIES"
ForeColor="yellow" NavigateUrl="./Documents/pps/HIS CAPABILITIES 20070109.pps"></asp:HyperLink>
</font></font>
</td>
</tr>
<tr>
<td bgcolor="WHITE" style="width: 80%; height: 20px; text-align: center" align="center">
<font class="csummittextw" color="Black" style="font-family: Verdana" size="1">© Copyright
2006, Hexaware Technologies Ltd. All rights reserved. | Site best viewed in IE 6.0
& above at 1024 x 768 resolution</font>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
<b>CSS is as follows</b>
html,
body {
margin ;
padding ;
height:55%; /* 100 % height */
}
html>body #headerTop {
position:relative;
z-index:10; /* Prevent certain problems with form controls */
}
html>body #contentMain {padding: 6em 1em;} /* 6em = height of #header and #footer + 1em, 1em = give the content some breathing space */
#footer {
width:100%;
}
Thanks and best regards
Omkar Ghaisas
|
|
|
|
|
I have created a web control which contains a panel and some labels in it. But I can not access those labels on the page where i am trying to use this control because its access specifier is protected. I want to change it to public but I can not find the code.Where can i find the code to change the access specifier of label from protected to public
|
|
|
|
|
My problem is that i am not able to collects from a URL automatically.
For example
i am created one window form.there is three control 1) text box for URL 2) Button for Get Data 3) textbox for
showing get data. now i want to put into URL text box -
http://www.pricerunner.co.uk/sound-and-vision/vision/tv/712631/prices. then i should click the get data button.
then it will return pricerange i.e £1437.75 - £1999.99 or lowest price only £1437.75. and that value will displat
into show data textbox.
pls let me help, how can we do this work. if we can sucess we will do it into a batch process.
We can use any techenology into .net framework
thanks in advance
samik nandi
|
|
|
|
|
i want to get a value of cell where check box is clicked.
and geeting an error of Oject Refence is not set to an instance of an object.
plz tell how i can get a value
foreach (GridViewRow row in GridView1.Rows)<br />
{<br />
bool result = ((CheckBox)row.FindControl("CheckBox1")).Checked;<br />
if (result)<br />
{<br />
String id = ((TextBox)row.Cells[0].FindControl("TextBox1")).Text;<br />
}<br />
}
|
|
|
|
|
Please check the RowType before you use FindControl function. I think you are searching the CheckBox in HeaderRow.
Use FindControl when the RowType is an Item.
|
|
|
|
|
hello everybody
i m making a web application with vs2003.
i hav to make a menu in that application.
plz suggest some site or respond with some code.
regards
Ajay
|
|
|
|
|
What type of menu do you required. Does the menu contains any sub menus?. If not create an User Controls with the Link buttons and on click of the Link button do what ever you need i.e. redirecting to some page.
If the menu contains sub menus let me know I will give you the code.
Regards,
Kalyan
|
|
|
|
|
</b>How to connect an sql query to a Button in asp.net???
Praveen.K
Graviton Technologies Pv.Ltd
Banglore
|
|
|
|
|
What do you want?, Change the query text, execute the query.. ???
keep Learning and you never will be out of date...
|
|
|
|
|
In the OnClock event, just create your connection, query, etc.
|
|
|
|
|
hi to all
i have a dropdownlist on page try to validate through RequiredfieldValidater BUT it is not working.
i think the possible error in Initial value property of required field validator..
plz. help me how to implement validation on dropdownlist and sent some sample code if possble
thanks
john
|
|
|
|
|
can you specify what exactly you want to validate..?
pradip kishore
|
|
|
|
|
I have used a RequiredFieldValidator for dropdown lists loads of times. The only thing to remember is to set InitialValue to whatever the value of your "Please Select" entry is.
|
|
|
|
|
Hi!
What I did in my project is that, I inserted a new Listitem at index 0 of my dropdownlist with, say, value of "-1".
then I added a CompareValidator control with properties:
Type="String";
ControlToValidate="MyDropdownList";
ValueToCompare="-1"
Operator="NotEqual";
coded like ->
<asp:DropDownList ID="MyDropdownList" runat="server">
<asp:ListItem Text="Please Select" Value="-1"></asp:ListItem>
<asp:ListItem Text="ListItem1" Value="Value1"></asp:ListItem>
<asp:ListItem Text="ListItem2" Value="Value2"></asp:ListItem>
</asp:DropDownList>
<asp:CompareValidator Type="String" ControlToValidate="MyDropdownList" ValueToCompare="-1" Operator="NotEqual" ID="CompareValidator7" Text="*" Display="dynamic" runat="server"></asp:CompareValidator>
Note that the ValueToCompare's value is the same as the ListItem value I added to my dropdownlist, and the Operator is "NotEqual".
hope it helps..
//mastereuo
On Error Goto Hell
|
|
|
|
|
How is this any different to using a requiredFieldValidator and setting the InitialValue to -1 (in your example)
|
|
|
|
|
i set initialvalue to -1 then, it is also not working???????
|
|
|
|
|
This my solution, you must to create a dropdownlist with only one item, the text is '-' y el value is the same...
So, insert a COMPAREVALIDATOR and make this changes
ControltoValidate: the dropdownlist
Operator: Not Equal
ValuetoCompare: - (Its the line)
Thats all, the validator fireup if you choose the line value
Best regards
keep Learning and you never will be out of date...
|
|
|
|
|
In my Main page,
<asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
<A href="javascript:GetDate('txtDate.ClientID')">View Calendar</A></td>
Here, I am passing the ClientID of the TextBox control in GetDate() method.
JavaScript Code:
function GetDate(CtrlName)
{
ChildWindow = window.open("MyCalendar.aspx?CtrlName=" + CtrlName, "PopUpCalendar", "width=270,height=270,top=200,left=200,toolbars=no,scrollbars=no,status=no,resizable=no");
}
In my Calendar Page (Popup), I have used the below function to return the date.
private void ReturnDate()
{
String returnScript = "";
returnScript += "<script language=javascript>";
returnScript += "window.opener.getElementById('";
returnScript += Request.QueryString["CtrlName"];
returnScript += "').value = '";
returnScript += strSelectedDate;
returnScript += "';window.close();";
returnScript += "<" + "/" + "script>";
ClientScript.RegisterStartupScript(this.GetType(), "", returnScript);
}
returnScript Output (while running):
"<script language=javascript>window.opener.getElementById('txtDate.ClientID').value = '01/31/2007';window.close();</script>"
My motto is to assign the Date Value in the TextBox of in my Main Page.
How can I solve this? Pls help me.
Regards,
Jay
|
|
|
|
|
Hi,
I have chenged below 2 lines of code, to work properly.
<A href="javascript:GetDate('<%=txtDate.ClientID%>')">View Calendar</A>
returnScript += "window.opener.document.getElementById('";
Now, It works fine
Regards,
Jay
|
|
|
|