15,898,134 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 Zukiari (Top 38 by date)
Zukiari
8-May-14 1:07am
View
Can you please explain the requirement?
Zukiari
9-Apr-14 7:48am
View
Hi,
Thank you for the answer.
Zukiari
24-Jul-13 2:16am
View
I want to open the excel file in a web page, not in seperate window and from the browser itself there should be all options like sorting and filtering.
Zukiari
2-Jul-13 7:42am
View
I want all the IP Address or host name that accessing that site. user has to login, but common login ID and password for all.
Zukiari
20-Mar-13 6:01am
View
Hi, Try by assigning the date time value to a variable.
DateTime dt = System.DateTime.Now;
con.Open();
OleDbCommand cmd =
new OleDbCommand(
"insert into coupen(voucher,RS,[Date]) values('" + _password + "','" + TxtAmount.Text + "',"+ dt + ")", con);
int result = cmd.ExecuteNonQuery();
con.Close();
Zukiari
1-Nov-12 9:35am
View
How will I get that?
Zukiari
1-Nov-12 9:06am
View
Here I'm getting the week no in year. I need for the month.
Thank you
Zukiari
1-Nov-12 8:33am
View
It getting correct. Can i count the week from monday, that is, for 07-01-2013 it is in second week but 1st monday of the month. I want to get the no as 1.
Zukiari
25-Sep-12 3:58am
View
Thank you for your post.
I'm getting the panel data to the printer, problem is that I'm getting blurred print. I want to improve the clarity of the print. Is there any way???
Thank you.
Zukiari
21-Sep-12 3:59am
View
I'm reducing the size to picturebox size. i've to print the form with images and labels. For labels also Clarity is vry poor.
Zukiari
17-Sep-12 6:15am
View
Thank you So much...
Zukiari
17-Sep-12 6:15am
View
Thank you So much...
Zukiari
14-Sep-12 6:54am
View
Hi,
I tried this code, but error is coming that 'document has no pages to display' at document.Close();
Zukiari
6-Sep-12 23:46pm
View
Thank You so much........
Zukiari
27-Aug-12 6:23am
View
Thank you. BuI don't konw how to code that first table values should go to sheet1 and second table values to sheet2. Can you please tell me that also...
Thanks a lot.
Zukiari
27-Aug-12 3:34am
View
When I'm clicking the button, I have to export data from two tables into two sheets of an excel file. I've to create multiple sheets and then export the data.
Thank you.
Zukiari
27-Aug-12 3:26am
View
Thanks for your reply.
Can I get the code in C#? Also how can I mention the sheet name while exporting to excel?
Zukiari
27-Aug-12 3:24am
View
Hi,
As I've to adjust the column width, I'm using the following code which for one datatable.
private void ExporttoExcel(DataTable table)
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.ContentType = "application/ms-excel";
HttpContext.Current.Response.Write(@"<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">");
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=Reports.xls");
HttpContext.Current.Response.Charset = "utf-8";
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("windows-1250");
//sets font
HttpContext.Current.Response.Write("
");
HttpContext.Current.Response.Write("<BR><BR><BR>");
//sets the table border, cell spacing, border color, font of the text, background, foreground, font height
HttpContext.Current.Response.Write("<Table border='1' bgColor='#ffffff' " +
"borderColor='#000000' cellSpacing='0' cellPadding='0' " +
"style='font-size:10.0pt; font-family:Calibri; background:white;'>");
foreach (DataRow row in table.Rows)
{//write in new row
HttpContext.Current.Response.Write("<TR>");
HttpContext.Current.Response.Write("<Td>");
HttpContext.Current.Response.Write(row[0].ToString());
HttpContext.Current.Response.Write("</Td>");
HttpContext.Current.Response.Write("<Td style='width: 25px;'>");
HttpContext.Current.Response.Write(row[1].ToString());
HttpContext.Current.Response.Write("</Td>");
HttpContext.Current.Response.Write("<Td>");
HttpContext.Current.Response.Write(row[2].ToString());
HttpContext.Current.Response.Write("</Td>");
HttpContext.Current.Response.Write("<Td style='width: 25px;'>");
HttpContext.Current.Response.Write(row[3].ToString());
HttpContext.Current.Response.Write("</Td>");
HttpContext.Current.Response.Write("<Td>");
HttpContext.Current.Response.Write(row[4].ToString());
HttpContext.Current.Response.Write("</Td>");
HttpContext.Current.Response.Write("<Td>");
HttpContext.Current.Response.Write(row[5].ToString());
HttpContext.Current.Response.Write("</Td>");
HttpContext.Current.Response.Write("</TR>");
}
HttpContext.Current.Response.Write("</Table>");
HttpContext.Current.Response.Write("
");
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
}
Just like that I've to export anothe data.
Thank you.
Zukiari
13-Jul-12 2:36am
View
Ok, Thank you.
Zukiari
28-Jun-12 7:45am
View
Thank you
Zukiari
15-Jun-12 0:20am
View
Thanks a lot.... There was some mismatch on the data.
Thank you
Zukiari
14-Jun-12 1:11am
View
Actually, the makeready table contains only one row wich is having the same date,shift and ns values. But in rdc_lb table there are multiple rows with same date,shift and ns values. I want to update the mrop value in each row of rdc_lb table with the value from makeready table.
Thank you.
Zukiari
26-May-12 0:15am
View
I''ve read that link, but it is not working for me.
Thank you for your response. The link is useful for me in another case. Thanks.
Zukiari
24-May-12 8:30am
View
While running the code, cb is null so that it fails on the condition-if (cb != null)
Zukiari
15-May-12 8:27am
View
IsPostBack is checking on Page_Load event no? But it is in Button_Click event. When the button is clicking, then only I'm chekking weather the field is null or not.
Thank you
Zukiari
16-Mar-12 9:06am
View
I want to get the vaue in the cells.
First I have tried with the following code:
string amt = (GridView1.Rows[e.RowIndex].Cells[3].Text).ToString();
string sn = (GridView1.Rows[e.RowIndex].Cells[0].Text).ToString();
con.Open();
//SqlCommand cmd = new SqlCommand("update p_a set frm = '" + Convert.ToDouble(from) + "', up2='"+ Convert.ToDouble(up2) +"', amt='"+ Convert.ToDouble(amt) +"' where sn='"+ Convert.ToInt16(sn) +"'", con);
SqlCommand cmd = new SqlCommand("update p_a set amt='" + Convert.ToDouble(amt) + "' where sn='" + Convert.ToInt16(sn) + "'", con);
//SqlCommand cmd = new SqlCommand("update p_a set amt='"+ amt +"' where sn='"+ sn+"'", con);
cmd.ExecuteNonQuery();
con.Close();
GridView1.EditIndex = -1;
Bindgrid();
But it is also resulting in error:
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 58: con.Open();
Line 59: //SqlCommand cmd = new SqlCommand("update p_a set frm = '" + Convert.ToDouble(from) + "', up2='"+ Convert.ToDouble(up2) +"', amt='"+ Convert.ToDouble(amt) +"' where sn='"+ Convert.ToInt16(sn) +"'", con);
Line 60: SqlCommand cmd = new SqlCommand("update p_a set amt='" + Convert.ToDouble(amt) + "' where sn='" + Convert.ToInt16(sn) + "'", con);
Line 61: //SqlCommand cmd = new SqlCommand("update p_a set amt='"+ amt +"' where sn='"+ sn+"'", con);
Line 62: cmd.ExecuteNonQuery();
Thank you.
Zukiari
13-Mar-12 8:00am
View
Actually, after deleting a row the gridview is getting automatically updated. But if I'm refreshing the page then the next row is also getting deleted whis is unwanted. Also if I'm inserting a data through textbox and then refreshing the page, data is adding to the table twice. What I've to do for this?
thank you.
Zukiari
29-Feb-12 7:57am
View
I have done the same, but getting error:
Server Error in '/DIS' Application.
--------------------------------------------------------------------------------
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +8637801
System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +69
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +35
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET Version:2.0.50727.4971
Zukiari
27-Feb-12 9:10am
View
I am having some dropdown list in my project. I've applied validation control to dropdown list as discussed above. If dropdownlist is selected when page is loaded, then also validation message is appearing if that value didn't change which is unwanted for me. How can I solve this problem?
Zukiari
17-Feb-12 8:39am
View
Actually, now the calculation pf certain values are doing in excel with some lookup tables and functions like VLOOKUP(). I've to convert the applications into dot net. The lookup tables are the masters of the application.
Thank you.
Zukiari
15-Feb-12 7:35am
View
Dear Friend, Thank You very much for your answer. It helped me a lot........
Thank You.
Dear friend, I've created some more tables in the same database. When I'm trying to take data from these tables I'm getting the same data that in the first table only. How can I select and insert data to these tables using the same class?
Zukiari
20-Dec-11 6:46am
View
When I've tried to that code an error occuered:'System.Web.UI.WebControls.ListItem' does not contain a definition for 'Enabled'
thank you
Zukiari
20-Dec-11 6:45am
View
Deleted
When I've tried to that code an error occuered:'System.Web.UI.WebControls.ListItem' does not contain a definition for 'Enabled'
thank you
Zukiari
20-Dec-11 6:41am
View
I've tried that one also, no use for me....
Thankyou
Zukiari
20-Dec-11 6:41am
View
I've checked with this also, but same result!!
Thank you.
Zukiari
16-Dec-11 6:37am
View
Thank you for your reply. Actually when opening the project, there was no other folders or web forms other tha OPAL. Then I've added the pages. But while right clicking there is no options like 'view code' or 'view design'.
Zukiari
15-Dec-11 7:51am
View
I'm having difficulty with both. When I'm opening the project design page is not coming, only html page is there.
Zukiari
5-Dec-11 7:06am
View
I'm new to this asp.net.I don't know how to use rowdatabound control. Can you please tell me more abut that.
Show More