15,949,686 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by sheena k (Top 32 by date)
sheena k
13-May-20 7:46am
View
Ok Thankyou
sheena k
13-May-20 1:10am
View
Thanks, but i need to call the service from local and remote machine and wants to access app.config data of window service that config data i am accessing in Onstart method for example i have written count = 4 in app.config file. This service count(app.config) i want to access in console test application in local/remote machine and gradually it will maintain(decrease) the count state whenever user call the service from same machine or different machine from console application..
In this situation i need to call the windows service data from console application.
sheena k
10-Apr-20 3:29am
View
Thanks Richard
sheena k
7-Apr-20 9:30am
View
Deleted
Thankyou..
sheena k
12-Oct-17 0:14am
View
sorry i did not understand your meaning
sheena k
1-Aug-16 6:59am
View
Thanks :)
sheena k
1-Aug-16 5:23am
View
yes correct but i want to search registry value using Root keyName. can u help me for reading key value in same
sheena k
1-Aug-16 4:52am
View
Deleted
Argument not optional error
sheena k
13-May-16 2:10am
View
Deleted
i have test file like this (aaa,bbb,ccc,ddd,eee)
i want to read 2-2 lines data after split it using count=2.after reading 2 lines(aaa,bbb) it should read next lines (ccc,ddd) at a times..means first two lines should not read again
sheena k
13-May-16 1:49am
View
Deleted
I am able to read file but using count this file should start from next line of the file
sheena k
9-May-16 5:10am
View
thank you so much ...:)
sheena k
9-May-16 4:12am
View
Deleted
I just want to read .ini file and all multiple keys want to assign combobox that it .
sheena k
9-May-16 3:46am
View
thanks griff.
But here i want to read multiple keys(default1,default2,default3 etc...) with one section (defaultType) and want to show in combobox ...so here i have to pass all keys like this "string s = ReadConfig("DefaultType", "default1");
string s = ReadConfig("DefaultType", "default2");"???
I am doing like this
retVal = ini.IniReadValue(section, key);
cmbName.Items.Add(retVal.ToString());
sheena k
18-Apr-16 9:13am
View
i tried this way..but same problem
sheena k
18-Apr-16 9:11am
View
Deleted
MailMessage mail = new MailMessage();
// //set the HTML format to true
// mail.IsBodyHtml = true;
// List<string> images = new List<string>();
// foreach (DataRow row in rows)
// {
// ImgUrl = row["ImageName"].ToString();
// images.Add(ImgUrl);
// }
// var html = AlternateView.CreateAlternateViewFromString(body, null, MediaTypeNames.Image.Gif);
// foreach (var image in images)
// {
// // html.LinkedResources.Add(new LinkedResource(image, new ContentType("image/gif"))
// html.LinkedResources.Add(new LinkedResource(image,MediaTypeNames.Image.Gif)
// {
// ContentId = "dynimg"
// //theEmailImage.ContentId = "myImageID";
// });
// } //create Alrternative HTML view
// AlternateView htmlView = AlternateView.CreateAlternateViewFromString(body.Replace("{HAPPYBIRTHDAYFOOTER}", HBFooter.ToString()), null, "text/html");
// //LinkedResource theEmailImage = new LinkedResource(BackgroundImage, MediaTypeNames.Image.Gif);
// LinkedResource theEmailImage = new LinkedResource(BackgroundImage);
// theEmailImage.ContentId = "myImageID";
// //Add the Image to the Alternate view
// htmlView.LinkedResources.Add(theEmailImage);
// mail.AlternateViews.Add(html);
// //htmlView.LinkedResources.Add(dynimg);
// //Add view to the Email Message
// mail.AlternateViews.Add(htmlView);
i tried like this but still getting error
sheena k
18-Apr-16 9:10am
View
Deleted
MailMessage mail = new MailMessage();
mail.IsBodyHtml = true;
var myResources = new List<LinkedResource>();
List<string> images = new List<string>();
foreach (DataRow row in rows)
{
ImgUrl = row["ImageName"].ToString();
images.Add(ImgUrl);
var imgLogo = new LinkedResource(ImgUrl);
imgLogo.ContentId = Guid.NewGuid().ToString();
imgLogo.ContentType = new ContentType("image/jpeg");
myResources.Add(imgLogo);
}
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(body.Replace("{HAPPYBIRTHDAYFOOTER}", HBFooter.ToString()), null, "text/html");
LinkedResource theEmailImage = new LinkedResource(BackgroundImage);
theEmailImage.ContentId = "myImageID";
htmlView.LinkedResources.Add(theEmailImage);
foreach (LinkedResource linkedResource in myResources)
{
htmlView.LinkedResources.Add(linkedResource);
}
List<string> ImgList = new List<string>(); byte[] imageBytes = null;
foreach (DataRow row in rows)
{
ImgUrl = row["ImageName"].ToString();
using (Image image = Image.FromFile(ImgUrl))
{
using (MemoryStream m = new MemoryStream())
{
image.Save(m, image.RawFormat);
imageBytes = m.ToArray();
ContentType c = new ContentType("image/jpeg");
// Convert byte[] to Base64 String
base64String = Convert.ToBase64String(imageBytes);
body = body.Replace("/pic", base64String);
}
}
ImgList.Add(ImgUrl);
}
mail.AlternateViews.Add(htmlView);
// mail.AlternateViews.Add(htmlimgView);
i am doing like this...
sheena k
18-Apr-16 9:08am
View
Deleted
<pre lang="C#">private static int sendHtmlEmail(string from_Email, string to_Email, string body, string from_Name, string Subject, string SMTP_IP, int SMTP_Server_Port, List<DataRow> rows)
{
int RetSend = 0; string base64String = null;
try
{
if (body != " ")
{
//create an instance of new mail message
MailMessage mail = new MailMessage();
//set the HTML format to true
mail.IsBodyHtml = true;
var myResources = new List<LinkedResource>();
List<string> images = new List<string>();
foreach (DataRow row in rows)
{
ImgUrl = row["ImageName"].ToString();
images.Add(ImgUrl);
var imgLogo = new LinkedResource(ImgUrl);
imgLogo.ContentId = Guid.NewGuid().ToString();
imgLogo.ContentType = new ContentType("image/jpeg");
//imgLogo.ContentId = "dynimg";
myResources.Add(imgLogo);
}
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(body.Replace("{HAPPYBIRTHDAYFOOTER}", HBFooter.ToString()), null, "text/html");
LinkedResource theEmailImage = new LinkedResource(BackgroundImage);
theEmailImage.ContentId = "myImageID";
htmlView.LinkedResources.Add(theEmailImage);
foreach (LinkedResource linkedResource in myResources)
{
htmlView.LinkedResources.Add(linkedResource);
}
List<string> ImgList = new List<string>(); byte[] imageBytes = null;
foreach (DataRow row in rows)
{
ImgUrl = row["ImageName"].ToString();
using (Image image = Image.FromFile(ImgUrl))
{
using (MemoryStream m = new MemoryStream())
{
image.Save(m, image.RawFormat);
imageBytes = m.ToArray();
ContentType c = new ContentType("image/jpeg");
// Convert byte[] to Base64 String
base64String = Convert.ToBase64String(imageBytes);
body = body.Replace("/pic", base64String);
}
}
ImgList.Add(ImgUrl);
}
// htmlView.TransferEncoding.ToString();
//Add the Image to the Alternate view
mail.AlternateViews.Add(htmlView);
// htmlView.LinkedResources.Add(dynimg);
// mail.AlternateViews.Add(htmlimgView);
//set the "from email" address and specify a friendly 'from' name
mail.From = new MailAddress(from_Email, from_Name);
//set the "to" email address
mail.To.Add(to_Email);
//set the Email subject
mail.Subject = Subject;
mail.IsBodyHtml = true;
try
{
//set the SMTP info
System.Net.NetworkCredential cred = new System.Net.NetworkCredential(USERNAME, PASSWORD);
SmtpClient smtp = new SmtpClient(MailServer, Port);
//smtp.EnableSsl = false;
sheena k
18-Apr-16 9:08am
View
<pre lang="C#">private static int sendHtmlEmail(string from_Email, string to_Email, string body, string from_Name, string Subject, string SMTP_IP, int SMTP_Server_Port, List<DataRow> rows)
{
int RetSend = 0; string base64String = null;
try
{
if (body != " ")
{
//create an instance of new mail message
MailMessage mail = new MailMessage();
//set the HTML format to true
mail.IsBodyHtml = true;
var myResources = new List<LinkedResource>();
List<string> images = new List<string>();
foreach (DataRow row in rows)
{
ImgUrl = row["ImageName"].ToString();
images.Add(ImgUrl);
var imgLogo = new LinkedResource(ImgUrl);
imgLogo.ContentId = Guid.NewGuid().ToString();
imgLogo.ContentType = new ContentType("image/jpeg");
//imgLogo.ContentId = "dynimg";
myResources.Add(imgLogo);
}
//string image1Path = HttpContext.Current.Server.MapPath("~/Content/images/yasser.jpg");
//create Alrternative HTML view
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(body.Replace("{HAPPYBIRTHDAYFOOTER}", HBFooter.ToString()), null, "text/html");
//AlternateView htmlView = AlternateView.CreateAlternateViewFromString(body.Replace("{HAPPYBIRTHDAYFOOTER}", HBFooter.ToString()), null, MediaTypeNames.Text.Html);
// AlternateView htmlView1 = AlternateView.CreateAlternateViewFromString("Image there?<br /><img src=\"cid:test.png@71236720.91827344\" /><br />Hope so!", System.Text.Encoding.UTF8, "text/html");
// htmlView.TransferEncoding = System.Net.Mime.TransferEncoding.QuotedPrintable;
LinkedResource theEmailImage = new LinkedResource(BackgroundImage);
theEmailImage.ContentId = "myImageID";
htmlView.LinkedResources.Add(theEmailImage);
foreach (LinkedResource linkedResource in myResources)
{
htmlView.LinkedResources.Add(linkedResource);
}
List<string> ImgList = new List<string>(); byte[] imageBytes = null;
foreach (DataRow row in rows)
{
ImgUrl = row["ImageName"].ToString();
using (Image image = Image.FromFile(ImgUrl))
{
using (MemoryStream m = new MemoryStream())
{
image.Save(m, image.RawFormat);
imageBytes = m.ToArray();
ContentType c = new ContentType("image/jpeg");
// Convert byte[] to Base64 String
base64String = Convert.ToBase64String(imageBytes);
body = body.Replace("/pic", base64String);
}
}
ImgList.Add(ImgUrl);
}
// htmlView.TransferEncoding.ToString();
//Add the Image to the Alternate view
mail.AlternateViews.Add(htmlView);
// htmlView.LinkedResources.Add(dynimg);
// mail.AlternateViews.Add(htmlimgView);
//set the "from email" a
sheena k
2-Nov-15 2:38am
View
hey thanks but i need to update this query on the base of ComID only..pls suggest with this
sheena k
8-Jan-15 8:29am
View
thanks to all...u people are correct.
Online converter also unable to do compress this file.
sheena k
8-Jan-15 7:39am
View
I tried by this method but very less difference(that is not acceptable).i want to apply another method becoz I want to compress file size from 2 mb to 300 kb.
sheena k
8-Jan-15 7:18am
View
no
sheena k
8-Jan-15 7:09am
View
before compression: 2295KB
after compression: 2232KB
sheena k
8-Jan-15 7:04am
View
@Richard : yes its already compressed but little bit difference coming by using this way....I want another method to reduce file upto 70%
sheena k
8-Jan-15 6:52am
View
how to reduce the .zip file size ???
right now its size in MB I want to reduce it into KB...can u help me ??
sheena k
28-Oct-14 2:04am
View
void Session_Start(object sender, EventArgs e)
{
}
void Session_End(object sender, EventArgs e)
{
if (Session["SESSIONINFO"] != null)
{
Info Info = (Info)Session["SESSIONINFO"];
if (Info != null)
{
using (TestSrvc wbSvc = new TestSrvc())
{
wbSvc.LogoutBC(Info.BCID, DateTime.Now);
}
}
}
Session.Clear();
Session.Abandon();
}
Yes that ajax call only for request n response purpose but i set for session start nd session end like this in global.asax
sheena k
28-Oct-14 1:35am
View
Deleted
if (sessionType == "1")
{
string loggedIntime = DateTime.Now.ToString("dd-MMM-yyy/hh:mm:ss");
context.Session.Add("TEST", par);
}
i think i did something wrong here or ?????
sheena k
28-Oct-14 1:32am
View
In this i have given session timeout:120000
But when i am running my page session is clearing within 2 sec.
sheena k
15-Sep-14 0:48am
View
thanks a lot
sheena k
12-Sep-14 5:42am
View
Please reply
sheena k
12-Sep-14 5:41am
View
<body>
<form id="form1" runat="server">
<script type="text/javascript">
function Validations()
{
var FullName,Address;
if(FullName=document.getElementById("<%=txtFullName.ClientID%>"))
{
if((FullName.value.length == 0)||(FullName.value.length == ""))
{
FullName.focus();
alert("Please enter FullName");
return false;
}
}
if(Address=document.getElementById("<%=txtAddress.ClientID%>"))
{
if((Address.value.length == 0)||(Address.value.length == ""))
{
Address.focus();
alert("Please enter Address");
return false;
}
}
<div id="Div1" style="display: block" runat="server">
<table width="100%" border="1">
<tr>
<td width="50%" style="vertical-align: top;">
<fieldset>
Declarant Details
<table width="100%" border="0">
<tr>
<td class="label" colspan="1" style="width: 109px">
<asp:Label runat="server" ID="FullName" Text="Full Name :">
</td>
<td colspan="3">
<asp:TextBox ID="txtFullName" runat="server">
</td>
</tr>
<tr>
<td class="label" colspan="1">
<asp:Label runat="server" ID="Address">
Address:
</td>
<td colspan="3">
<asp:TextBox ID="txtAddress" runat="server">
</td>
</tr>
<tr>
</table>
</fieldset>
</td>
</tr>
</table>
</div>
<div>
<table>
<tr>
<td>
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click"
OnClientClick="javascript:return Validations();" /></td>
</tr>
</table>
</div>
</form>
</body>
sheena k
12-Sep-14 5:26am
View
How to use validation summary in javascript validation for empty textbox control without requiredfieldvalidator in ASP.NET ??
Means when I set a OnClientClick="Javascript:return Validations()" on submit button,It is showing Single alert box validation but i want to show all summary of empty box in one alert box...how it is possible Pls help me its urgent....thnxs in advance
Show More