15,885,546 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 Python 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 mohdniyaz169 (Top 12 by date)
mohdniyaz169
1-May-16 19:50pm
View
Can u plz suggest me some book for e-commerce projects or links
mohdniyaz169
28-Mar-16 5:33am
View
i have used paging but not good response can u please give me some example,
somebody told me use web services but i don't know how to do this using web services
mohdniyaz169
1-Aug-13 4:25am
View
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//using NPOI.HSSF.UserModel;
//using NPOI.HSSF;
//using NPOI.HSSF.Util;
//using NPOI;
using System.IO;
using System.Collections;
using System.Xml;
using System.Xml.XPath;
using System.Net.Mail;
using System.Data.SqlClient;
using System.Net;
public class CGeneral
{
public static SqlConnection con = new SqlConnection(DecValue(ConfigurationManager.ConnectionStrings["FinCon"].ConnectionString));
public static string constring = DecValue(ConfigurationManager.ConnectionStrings["FinCon"].ConnectionString);
public static DataTable Dt;
public static DateTime CurrentDate=GetCurrentDate();
// public HSSFWorkbook workbook;
//public HSSFSheet WSheet;
public CGeneral()
{
}
public static string GenUniqNum()
{
string s = "";
DateTime dt = DateTime.Now;
string format = "HHmmss";
s = dt.ToString(format);
string sd, sm, sy;
sy = Convert.ToChar((dt.Year - 2000) + 53).ToString();
if (dt.Month >= 10)
sm = Convert.ToChar(55 + dt.Month).ToString();
else
sm = dt.Month.ToString();
sd = dt.Day.ToString().PadLeft(2, '0');
int rn;
Random rand = new Random();
rn = rand.Next(999);
s = sd + sm + sy + s + rn.ToString().PadLeft(3, '0');
/*For 8 digit password*/
s=s.Remove(8);
return s;
}
public static DateTime GetIndianDate(string Datedt)
{DateTime myDateTime=new DateTime();
try
{
System.Globalization.CultureInfo ukCulture = new System.Globalization.CultureInfo("en-GB");
// pass the DateTimeFormat information to DateTime.Parse
myDateTime = DateTime.Parse(Datedt, ukCulture.DateTimeFormat);
return myDateTime;
}
catch (Exception ex) { ExecuteError(0, 0, ex); return myDateTime; }
}
public static string SentMail(string To, string Subject, string Body,FileUpload FileUplod)
{
try
{
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add(To);
message.Subject = Subject;
message.From = new System.Net.Mail.MailAddress("plan@planyourworld.org");
message.Body = Body;
if (FileUplod.HasFile)
{
// File Upload path
String FileName = FileUplod.PostedFile.FileName;
//Getting Attachment file
System.Net.Mail.Attachment mailAttachment = new System.Net.Mail.Attachment(FileName,System.Net.Mime.MediaTypeNames.Application.Octet);
//Attaching uploaded file
message.Attachments.Add(mailAttachment);
}
//message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1);
//message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "plan");
//message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "12345678");
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("planyourworld.org", 587);
smtp.Credentials = new System.Net.NetworkCredential("plan@planyourworld.org", "12345678");
smtp.Send(message);
return "Mail sent";
}
catch (Exception ex)
{
CGeneral.ExecuteError(0, 0, ex);
return "Error - " + ex.Message;
}
}
public static string SentMail(string To, string Subject, string Body)
{
try
{
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add(To);
message.Subject = Subject;
mohdniyaz169
10-Jul-13 5:15am
View
i have 2 button on master page.. one is working 2nd button is not working..
here is the code..
</td><td valign="top" align="right">
<asp:Button ID="btnLoginPop" runat="server" Text="Login" CssClass="myButton2"
onclick="btnLoginPop_Click"/>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</td>
protected void btnLoginPop_Click(object sender, EventArgs e)
{
ModalPopupExtender1.Show();
}
is working
but
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(" my name is niya z");
} is not working
mohdniyaz169
10-Jul-13 5:02am
View
yes,
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
////
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(" my name is niya z");
}
mohdniyaz169
11-Jun-13 23:01pm
View
in first line
int ID = Convert.ToInt32(GVDetails.DataKeys[e.RowIndex].Values["ID"]);
mohdniyaz169
12-Oct-12 13:18pm
View
i have to install in service pac 1 so please tell me how
mohdniyaz169
27-Aug-12 6:02am
View
yes i want to code for storing and downloding
mohdniyaz169
27-Aug-12 4:49am
View
my frnd i don't know how to store file and downlode it if u have this type of project or any solution pls give me
mohdniyaz169
26-Jun-12 3:06am
View
not working
mohdniyaz169
31-May-12 15:47pm
View
my friend do you have any video tutorial or project for design a website layout example header,footer,sidebar,
mohdniyaz169
29-May-12 10:43am
View
thanks frend
Show More