15,881,172 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 Nishant.Chauhan80 (Top 106 by date)
Nishant.Chauhan80
21-Jul-22 1:26am
View
Thank you so much sir
Nishant.Chauhan80
21-Jul-22 1:26am
View
Thank you so much sir
Nishant.Chauhan80
22-Mar-22 1:20am
View
An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (machine.config)
StackTrace: at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)
at System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams)
at System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle)
at MPAdmin.Page_Load(Object sender, EventArgs e)
Source: System.Configuration
TargetSite: Void ThrowIfErrors(Boolean)
Nishant.Chauhan80
22-Mar-22 0:30am
View
i have many try set target framework to 3.0,3.5 but same error display
Nishant.Chauhan80
19-Oct-21 0:13am
View
Thank you so much sir but i want to stid and classid columns with sum of amount
Nishant.Chauhan80
29-Apr-21 2:00am
View
but FIR No three digit showing only two digit like
FIR NO Showing
FIR:113 11
FIR:245 24
Showing only two digit when apply your query
Nishant.Chauhan80
11-Sep-20 15:22pm
View
How sir please give me some example
Nishant.Chauhan80
11-Sep-20 14:54pm
View
how to define my code please tell me
return View(dbhandle.GetAboutTitlepage().ToList<>); //error
Nishant.Chauhan80
8-Sep-20 15:26pm
View
see my code when i click edit button for call function error occur "JavaScript runtime error: Object doesn't support property or method 'edit"
Nishant.Chauhan80
8-Sep-20 14:34pm
View
please update my question error occur when edit button "JavaScript runtime error: Object doesn't support property or method 'edit"
Nishant.Chauhan80
14-Feb-19 10:53am
View
Thanks sir
Nishant.Chauhan80
4-Feb-19 11:24am
View
Thanku for reply sir I don't understand.
Nishant.Chauhan80
3-Dec-18 5:00am
View
level indicate hierarchy
sde parent
AE child
JE subchild
i want to show only child data through by parent level
Nishant.Chauhan80
3-Dec-18 4:59am
View
i want to show only child data by parent data (SDE-R2 00010104)
"16 Sh. Surinder AE-R2 0001010401 ELE16"
Nishant.Chauhan80
11-Jul-18 2:31am
View
see my code
Nishant.Chauhan80
11-Jul-18 2:24am
View
any example through javascript sha256
Nishant.Chauhan80
11-Jul-18 2:22am
View
i want to use sha256
Nishant.Chauhan80
7-Jun-18 5:28am
View
sorry richard i will remain remember next time.
Nishant.Chauhan80
24-May-18 5:35am
View
second monitor means
Nishant.Chauhan80
23-May-18 6:21am
View
please send me example
Nishant.Chauhan80
23-May-18 4:24am
View
because i want generate runtime report on new window when close report then drop table
Nishant.Chauhan80
23-May-18 3:48am
View
multiple records not insert temporary table through looping
Nishant.Chauhan80
23-May-18 3:42am
View
please see my query and code
Nishant.Chauhan80
23-May-18 3:42am
View
please check my code
Nishant.Chauhan80
17-May-18 3:21am
View
thanku sir
Nishant.Chauhan80
10-May-18 23:39pm
View
but modalpop not hide and not working export pdf code
Nishant.Chauhan80
9-May-18 23:39pm
View
thanks sir
Nishant.Chauhan80
9-May-18 4:06am
View
srry sir but this post brief explain please see this post
Nishant.Chauhan80
6-May-18 4:30am
View
working thanks sir
Nishant.Chauhan80
6-May-18 4:27am
View
i will try but not insert data into table
Nishant.Chauhan80
6-May-18 4:25am
View
i will try 28 feb but not insert data same error
Nishant.Chauhan80
16-Apr-18 5:23am
View
sorry sir void instead of string into method
Nishant.Chauhan80
16-Apr-18 5:22am
View
dropdownlist value into dep1
my error "Cannot implicitly convert type 'void' to 'object' "
Nishant.Chauhan80
28-Nov-17 3:58am
View
But sir on local server works fine same credentials
Nishant.Chauhan80
1-Dec-16 2:35am
View
Thanks its work....
Nishant.Chauhan80
3-Aug-16 3:14am
View
Thanks its work this code
Nishant.Chauhan80
3-Aug-16 2:27am
View
no i don't want to change datatype into table
Nishant.Chauhan80
3-Aug-16 2:20am
View
CREATE TABLE [dbo].[CompRecd](
[ID] [numeric](15, 0) IDENTITY(1,1) NOT NULL,
[ComCat] [varchar](200) NULL,
[ComSubCat] [varchar](200) NULL,
[Whom] [varchar](100) NULL,
[HouseNo] [varchar](200) NULL,
[City] [varchar](50) NULL,
[MobNo] [varchar](20) NULL,
[PhoNo] [varchar](25) NULL,
[EmailID] [varchar](200) NULL,
[Complaint] [varchar](1000) NULL,
[TimeStamp] [datetime] NULL,
[FileData] [varbinary](max) NULL,
[ComNo] [varchar](25) NULL,
[officer] [numeric](15, 0) NULL,
[from] [numeric](15, 0) NULL,
[CompSubCat2] [varchar](200) NULL,
[Locality] [varchar](100) NULL,
[Comment] [varchar](200) NULL,
[FileDataType] [varchar](100) NULL,
[ipaddress] [varchar](100) NULL,
[Mark_userid] [int] NULL,
CONSTRAINT [compid_pk] UNIQUE NONCLUSTERED
Nishant.Chauhan80
13-May-15 10:11am
View
yes i want adding records by footer row but i want last record then hide
Nishant.Chauhan80
13-Mar-15 3:01am
View
while (dr.Read())
Nishant.Chauhan80
16-Jan-15 0:53am
View
yes sir....
Nishant.Chauhan80
14-Jan-15 2:59am
View
sir spouse i have one anchor tag and two checkboxes when i click on anchor Tag automatically checked but checked only checkbox store id in anchor tag
Nishant.Chauhan80
14-Jan-15 2:38am
View
how to dynamically store id in one checkbox
Nishant.Chauhan80
13-Jan-15 6:17am
View
thanks a lot sir...
Nishant.Chauhan80
12-Jan-15 8:26am
View
yes..
Nishant.Chauhan80
8-Jan-15 3:05am
View
i want to fetch using javascript
Nishant.Chauhan80
23-Dec-14 7:32am
View
how to use if else condition ..
Nishant.Chauhan80
23-Dec-14 7:07am
View
i want to query c# if- else condition
Nishant.Chauhan80
23-Dec-14 7:07am
View
i want to query c# if- else condition
Nishant.Chauhan80
23-Dec-14 7:06am
View
i want to query c# if- else condition
Nishant.Chauhan80
4-Dec-14 4:17am
View
plz sir brief explain with code
Nishant.Chauhan80
3-Dec-14 2:45am
View
ActualDate is current date time of system
Nishant.Chauhan80
3-Dec-14 2:35am
View
ok sir thanks i was thought any formula StartDate Vs Actual Complete Date ok i use current date thanks again
Nishant.Chauhan80
3-Dec-14 2:33am
View
thanks a lot sir...
Nishant.Chauhan80
3-Dec-14 2:25am
View
No Column already Exist ACompleteDate(Actual Complete Date) Column See On above My Table But How to calculate ACompleteDate(Actual Complete Date) Vs Start Date
Nishant.Chauhan80
3-Dec-14 2:14am
View
which date insert in this column ACompleteDate(Actual Complete Date) Column
Nishant.Chauhan80
3-Dec-14 2:09am
View
i want to insert Value in ACompleteDate(Actual Complete Date) Column but which value
Nishant.Chauhan80
26-Nov-14 0:07am
View
Actually Sir.. Error Found after Con.Open(); Line
Nishant.Chauhan80
25-Nov-14 4:19am
View
System.Data.OleDb.OleDbCommand cmd = con.CreateCommand();
Nishant.Chauhan80
24-Nov-14 2:11am
View
where ? Before @xml in above store-p
Nishant.Chauhan80
20-Nov-14 8:05am
View
thank you very much sir
Nishant.Chauhan80
20-Nov-14 7:41am
View
how ?
Nishant.Chauhan80
20-Nov-14 7:39am
View
your code is right i have generated "IProductService.cs" file but i dont know code (create,update delete) in this fields
internal void Create(Kendo.Mvc.Examples.Models.ProductViewModel product)
{
throw new NotImplementedException();
}
internal void Update(Kendo.Mvc.Examples.Models.ProductViewModel product)
{
throw new NotImplementedException();
}
internal void Destroy(Kendo.Mvc.Examples.Models.ProductViewModel product)
{
throw new NotImplementedException();
}
Nishant.Chauhan80
20-Nov-14 4:05am
View
sir plz give one example display how do this..
Nishant.Chauhan80
20-Nov-14 4:01am
View
ok i will try solve this...
Nishant.Chauhan80
20-Nov-14 2:47am
View
plz sir explain brief
Nishant.Chauhan80
20-Nov-14 2:39am
View
how ? please brief describe
Nishant.Chauhan80
19-Nov-14 2:15am
View
i want to row color changing one by one using for loop in my Export Excel File my code following :
Microsoft.Office.Interop.Excel.Application excelApplication = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook workbook = excelApplication.Workbooks.Open(filename,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
foreach (Excel.Worksheet wrkst1 in workbook.Worksheets)
{
Excel.Range usedrange = wrkst1.UsedRange;
usedrange.Columns.AutoFit();
wrkst1.Tab.Color = 279;
//Excel.Range formatRange;
//formatRange = wrkst1.get_Range("b1", "k6");
//formatRange.Interior.Color = System.Drawing.
//ColorTranslator.ToOle(System.Drawing.Color.YellowGreen);
//formatRange = wrkst1.get_Range("b7", "k20");
//formatRange.Interior.Color = System.Drawing.
//ColorTranslator.ToOle(System.Drawing.Color.Yellow);
Excel.Range rng = (Excel.Range)wrkst1.Cells[1, 1];
Excel.Range row = rng.EntireRow;
row.Insert(Excel.XlInsertShiftDirection.xlShiftDown, false);
//wrkst1.get_Range("E1", "F1").Merge(false);
Excel.Range chartRange;
chartRange = wrkst1.get_Range("E1");
chartRange.FormulaR1C1 = objModule.Title;
chartRange.HorizontalAlignment = 3;
chartRange.VerticalAlignment = 3;
//chartRange.Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Yellow);
chartRange.Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Green);
chartRange.Font.Size = 20;
//ColorConverter cc = new ColorConverter();
//wrkst1.Cells[1, 10].Interior.Color = ColorTranslator.ToOle((Color)cc.ConvertFromString("#F1DCDB"));
}
excelApplication.DisplayAlerts = false;
((Microsoft.Office.Interop.Excel.Worksheet)workbook.Worksheets[1]).Delete();
workbook.Close(true, filename, null);
excelApplication.DisplayAlerts = true;
}
catch (Exception ex)
{
}
//return File(filename, "application/msexcel");
return File(filename, "application/x-excel", DateTime.Now.Ticks + "_Report.xlsx");
}
Nishant.Chauhan80
18-Nov-14 2:52am
View
Not working this in my Code
Nishant.Chauhan80
17-Nov-14 8:45am
View
ok mam i want add row in export excel file because i want to show title on top excel my code following :-
MModule objModule = new MModule();
objModule.LoadModule(MID);
DatabaseObject objData = new DatabaseObject();
string file = DateTime.Now.Ticks + "_" + objModule.Title + ".xlsx";
System.IO.File.Copy(Server.MapPath("/Excel/Export/Atemplate.xlsx"), Server.MapPath("/Excel/Export/" + file));
string filename = Server.MapPath("/Excel/Export/" + file);
objData.Query = "SELECT * FROM " + objModule.TableName + "";
DataTable dtReport = objData.GetTable();
System.Data.OleDb.OleDbConnection con = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filename + ";Mode=ReadWrite;Extended Properties=\"Excel 12.0 Xml;HDR=Yes;Readonly=False;IMEX=0;\"");
con.Open();
System.Data.OleDb.OleDbCommand cmd = con.CreateCommand();
string tableString = "";
string ColString = "";
for (int i = 0; i < dtReport.Columns.Count; i++)
{
tableString += "[" + dtReport.Columns[i].Caption + "] varchar(255),";
ColString += "[" + dtReport.Columns[i].Caption + "],";
}
tableString = tableString.Substring(0, tableString.Length - 1);
try
{
ColString = ColString.Substring(0, ColString.Length - 1);
//***************** Create Excel Sheet Table *********************//
cmd.CommandText = "CREATE TABLE [" + objModule.Title + "] ( " + tableString + ");";
cmd.ExecuteNonQuery();
string ValString = "";
for (int j = 0; j < dtReport.Rows.Count; j++)
{
ValString = "";
for (int i = 0; i < dtReport.Columns.Count; i++)
{
ValString += "'" + dtReport.Rows[j][i] + "',";
}
ValString = ValString.Substring(0, ValString.Length - 1);
cmd.CommandText = "Insert Into [" + objModule.Title + "] (" + ColString + ") Values (" + ValString + ");";
cmd.ExecuteNonQuery();
}
cmd.Dispose();
con.Dispose();
con.Close();
Microsoft.Office.Interop.Excel.Application excelApplication = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook workbook = excelApplication.Workbooks.Open(filename,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
foreach (Excel.Worksheet wrkst1 in workbook.Worksheets)
{
Excel.Range usedrange = wrkst1.UsedRange;
usedrange.Columns.AutoFit();
wrkst1.Tab.Color = 300;
Excel.Range formatRange;
formatRange = wrkst1.get_Range("b1", "k6");
formatRange.Interior.Color = System.Drawing.
ColorTranslator.ToOle(System.Drawing.Color.YellowGreen);
// wrkst1.Cells[1, 2] = "YellowGreen";
formatRange = wrkst1.get_Range("b7", "k20");
formatRange.Interior.Color = System.Drawing.
ColorTranslator.ToOle(System.Drawing.Color.Yellow);
//wrkst1.get_Range("b2", "e3").Merge(false);
//chartRange = wrkst1.get_Range("b2", "e3");
//chartRange.FormulaR1C1 = "Your Heading Here";
//chartRange.HorizontalAlignment = 3;
//chartRange.VerticalAlignment = 3;
Nishant.Chauhan80
17-Nov-14 8:35am
View
i want to add title(header) above row then export data from table
Nishant.Chauhan80
17-Nov-14 8:05am
View
My Question Skip Excel Row Not Table Data Row
Nishant.Chauhan80
17-Nov-14 8:04am
View
My Question Skip Excel Row Not Table Data Row
Nishant.Chauhan80
17-Nov-14 8:04am
View
My Question Skip Excel Row Not Table Data Row
Nishant.Chauhan80
17-Nov-14 8:03am
View
My Question Skip Excel Row Not Table Data Row
Nishant.Chauhan80
14-Nov-14 2:02am
View
where use Range.AutoFit Method
Nishant.Chauhan80
14-Nov-14 1:20am
View
again same error..
Nishant.Chauhan80
14-Nov-14 0:55am
View
where dont use convert
Nishant.Chauhan80
14-Nov-14 0:37am
View
sir look my code with store-p again i hope you understand store-p
Nishant.Chauhan80
14-Nov-14 0:24am
View
Again Error sir after Change this solution
Nishant.Chauhan80
14-Nov-14 0:15am
View
where sir.. plz tell me
Nishant.Chauhan80
29-Oct-14 2:11am
View
array variable results
Nishant.Chauhan80
29-Oct-14 0:16am
View
iam really sorry sir plz.. check again my complete code
Nishant.Chauhan80
29-Oct-14 0:06am
View
array value to display on screen
Nishant.Chauhan80
28-Oct-14 23:58pm
View
i want to print value into array In array results variable value print button onclick
Nishant.Chauhan80
6-Oct-14 6:16am
View
thanku sir TOString remove this code its working
Nishant.Chauhan80
2-Sep-14 2:08am
View
how to modify connection another machine
Nishant.Chauhan80
29-Aug-14 8:15am
View
But how to connect connection other system i have also install sql server in other system
Nishant.Chauhan80
29-Aug-14 8:12am
View
But sir how to check connection other system
Nishant.Chauhan80
29-Aug-14 8:08am
View
Deleted
database copy another system
Nishant.Chauhan80
28-Aug-14 14:30pm
View
thanku sir
Nishant.Chauhan80
28-Aug-14 7:15am
View
sir i want share data online and install on multiple system it is possible clickonce
Nishant.Chauhan80
28-Aug-14 7:04am
View
first step publish after that create setup using installsheild
Nishant.Chauhan80
27-Aug-14 5:37am
View
thank u sir
Nishant.Chauhan80
27-Aug-14 5:36am
View
ok solve this prblm thank u guys
Nishant.Chauhan80
27-Aug-14 5:30am
View
yes sir but i want dont show id cell
Nishant.Chauhan80
27-Aug-14 5:28am
View
in my table total cells 13 but i want dont show id column
Nishant.Chauhan80
26-Aug-14 1:59am
View
thnks its working
Nishant.Chauhan80
26-Aug-14 1:58am
View
thankyou so much sir
Nishant.Chauhan80
26-Aug-14 1:45am
View
i also check correct display member & value member
Nishant.Chauhan80
9-Jul-14 1:04am
View
i am understand plz explain
Nishant.Chauhan80
4-Jul-14 5:55am
View
i want to add new column in my database table like unique id (primary key ) when import excel file to a table then automatic generate new add column to a table (unique id ) following code:-
protected void btnUpload_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
string path = string.Concat((Server.MapPath("~/Data/" + FileUpload1.FileName)));
FileUpload1.PostedFile.SaveAs(path);
OleDbConnection OleDbcon = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;");
OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Sheet3$]", OleDbcon);
OleDbDataAdapter objAdapter1 = new OleDbDataAdapter(cmd);
OleDbcon.Open();
DbDataReader dr = cmd.ExecuteReader();
string con_str = @"Data Source=vaio\sqlexpress;Initial Catalog=dbemp;Integrated Security=True";
// Bulk Copy to SQL Server
SqlBulkCopy bulkInsert = new SqlBulkCopy(con_str);
bulkInsert.DestinationTableName = "tbdata";
bulkInsert.WriteToServer(dr);
OleDbcon.Close();
Array.ForEach(Directory.GetFiles((Server.MapPath("~/Data/"))), File.Delete);
Label1.ForeColor = Color.Green;
Label1.Text = "successfully inserted";
FetchData();
newrow();
}
else
{
Label1.ForeColor = Color.Red;
Label1.Text = "Please select the File";
}
}
public void FetchData()
{
SqlConnection con = new SqlConnection(@"Data Source=vaio\sqlexpress;Initial Catalog=dbemp;Integrated Security=True");
SqlCommand cmd = new SqlCommand("select * from tbdata", con);
con.Open();
SqlDataReader rdr = cmd.ExecuteReader();
GridView1.DataSource = rdr;
GridView1.DataBind();
}
public void newrow()
{
SqlConnection con;
SqlDataAdapter dladpt;
DataSet dldst;
DataTable mydt;
con = new SqlConnection(@"Data Source=vaio\sqlexpress;Initial Catalog=dbemp;Integrated Security=True");
dladpt = new SqlDataAdapter("select * from tbdata", con);
dldst = new DataSet();
mydt = new DataTable();
dladpt.Fill(mydt);
DataColumn dcolColumn = new DataColumn("Link", typeof(string));
mydt.Columns.Add(dcolColumn);
DataRow drowItem;
foreach (DataRow row in mydt.Columns)
{
drowItem = mydt.NewRow();
drowItem["Link"] = "secret";
mydt.Rows.Add(drowItem);
}
GridView1.DataSource = mydt;
GridView1.DataBind();
}
}
Nishant.Chauhan80
1-Jul-14 4:53am
View
Thanks combobox1.text its working
Nishant.Chauhan80
30-Jun-14 2:44am
View
Not working this code
Nishant.Chauhan80
30-Jun-14 2:24am
View
private void button1_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("select * from tbadd where Dop between (@param1) and (@param2)", con);
cmd.Parameters.Add("@param1", SqlDbType.VarChar, 50).Value = dateTimePicker1.Value;
cmd.Parameters.Add("@param2", SqlDbType.VarChar, 50).Value = dateTimePicker2.Value;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
DataSet ds = new DataSet();
da.Fill(ds,"sr");
dataGridView1.DataSource = ds.Tables["sr"];
con.Close();
}
Nishant.Chauhan80
30-Jun-14 2:22am
View
but i use two datetimepicker
Show More