is Global variable good or bad in c#.net? If i declare Global variables instant of singleton variables its good or bad for application?? Thanks Raj
vnsraj
Posts
-
is Global variable good or bad in c#.net? -
How do I pass a web page value in windows form in .net.Hi All, How do I pass a web page value in windows form in .net. From my windows application, I want have open a web page and received web page value. Please sent sample code. Thanks Rajesh
-
Generate HTML to PDF with iTextSharpHi All, I use iTextSharp.dll to generate pdf from html in ap.net 2.0. Its successfully generate pdf but not same as my html. In my html there is table, but generated pdf layout is not same as html layout. How is it possible to make pdf same as my html file. Need you advice link given below for more details. http://somewebguy.wordpress.com/2009/05/08/itextsharp-simplify-your-html-to-pdf-creation/[^] Thanks Rajesh
-
find all images id from html file and store in array in c#Thanks for reply but if you have example code, so please provide me.
-
find all images id from html file and store in array in c#Hi All, I have html file, I want to find out all images and their ids from html file and store all images id in array. Please need your help... Thanks Rajesh
-
javascrpt keypress probelm ie7Hi All, I need your help. I developed a mobile web page for pda in asp.net 2.0. From the page user enter the 10 digit barcode number and get the result. My problem is that I am doing auto submit process or OnKeyPress function. When user enter 10 digit number then my JavaScript function called button click event. But its called twice in IE7, its working fine in firefox. Problem is in IE7 browser. My JavaScript code given below. function ScanTiket() { var val=document.getElementById('ctl00_tbBarCode').value; if(val.length==10) { //alert(val.length); var ele = document.getElementById('ctl00_btnGetRecords'); if ((ele !== null) && (ele != 'undefined')) { ele.click(); } } else { return false; } } please help me out. Thanks Rajesh....
-
Javascript onkeypress called twice in IE7Hi All, I need your help. I developed a mobile web page for pda in asp.net 2.0. From the page user enter the 10 digit barcode number and get the result. My problem is that I am doing auto submit process or OnKeyPress function. When user enter 10 digit number then my JavaScript function called button click event. But its called twice in IE7, its working fine in firefox. Problem is in IE7 browser. My JavaScript code given below. function ScanTiket() { var val=document.getElementById('ctl00_tbBarCode').value; if(val.length==10) { //alert(val.length); var ele = document.getElementById('ctl00_btnGetRecords'); if ((ele !== null) && (ele != 'undefined')) { ele.click(); } } else { return false; } } please help me out. Thanks Rajesh....
-
call client side function in server side function in asp.netI have a image button, I want to called a server side function in image button onclick function on same time I want to called a javascript function.
-
call client side function in server side function in asp.netHi All, I have a image button. I would like to call client side function as well as server side function in same button in same time. remember I don't want to call any javascript confirmation. Need yours advice....
-
SqlCommands.ExecuteNonQuery always return -1hi, No, you could not understand what I want to say. My previous all projects were working fine all ExecuteNonQuery working well but now I don't know all are ExecuteNonQuery return -1. When I used different used another SQl Server installed in other PC. then is works fine.
-
SqlCommands.ExecuteNonQuery always return -1Hi All, I have a problem with "ExecuteNonQuery". When I insert or update my database record then SqlCommands.ExecuteNonQuery always return -1 but same thing I use another sql server its working fine. I am sure that the actual problem is in my MS-SQL Server. what should I do? Please me out......... Thanks Raj
-
How to handel NULL referanceHi All I have a web application in asp.net 1.1 and sql server 2000, it was running alright previously, but for some weeks users are reporting that they are facing error. In the application whenever any error comes , user is being redirected to an error page and the actual error message comes to our(the programmers) email. The error message is very long but I'll mention the important part:- In the email :- System.NullReferenceException: Object reference not set to an instance of an object. at CBSolutions.ETH.Web.newlook.VSPage.LoadPageStateFromPersistenceMedium() at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) The code for function CBSolutions.ETH.Web.newlook.VSPage.LoadPageStateFromPersistenceMedium() is :- protected override object LoadPageStateFromPersistenceMedium() { if (ConfigurationSettings.AppSettings["ServerSideViewState"].ToUpper() == "TRUE") { string VSKey; VSKey = Request.Form["__VIEWSTATE_KEY"]; if (!(VSKey.StartsWith("VIEWSTATE_"))) { throw new Exception("Invalid VIEWSTATE Key: " + VSKey); } if (ConfigurationSettings.AppSettings["ViewStateStore"].ToUpper() == "CACHE") { return Cache[VSKey]; } else { DataTable VsDataTable; DataRow DbRow; VsDataTable = ((DataTable) Session["__VSDataTable"]); DbRow = VsDataTable.Rows.Find(VSKey); // if (DbRow!=null) // { // throw new Exception("VIEWStateKey not Found. Consider increasing the ViewStateTableSize parameter on Web.Config file."); // } return DbRow["VsData"]; } } else { return base.LoadPageStateFromPersistenceMedium(); } } Also in the Event Viewer application log, the following warning appears:- Event code: 3005 Event message: An unhandled exception has occurred. . . . . . Thread information: Thread ID: 6 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at System.Web.HttpServerUtility.MapPath(String path) at ETH.Global.Session_End(Object sender, EventArgs e) Here ETH.Global.Session_End(Object sender, EventArgs e) is written in Global.asax which is as follows:- protected void Session_End(Object sender, EventArgs e) { //clean up temporary files string[] files = System.IO.Directory.GetFiles(Server.MapPath("Files/"),"WF-" + Session.SessionID + "*.*");
-
Is this possible to use visual studio 2003,2005 & 2008 together?Hi All, I wanted to know that is this possible to installed Visual Studio 2003, Visual Studio 2005 & Visual Studio 2008 all together. System Information. Windows XP SP2 1 GB RAM 200 GB Hard drive Currently I have Visual Studio 2003 and 2005 I want to installed 2008 as well, If i installed VS-2008 then it will corrupts my previous version or not? Please reply... Thanks Raj :)
-
create a compatible website for PDA or Pocket PC in asp.net 2.0.Hi All, how can I create a compatible website for PDA or Pocket PC through asp.net 2.0. any one have an example please provide me the details. Thanks Raj...
-
Write HTML in PDF with iTextSharpHi All, I need to create pdf file using iTextSharp. I can write simple text in my pdf file. But How can I add html content in pdf file. I used string variable to hold html content. But when I use that variable my pdf file content not showing html format. my Code given below : private void createPDF() { //string newFile = @"N:\.NET\New Document.pdf"; string strContent = ""; StringWriter sw = new StringWriter(); string newFile = Server.MapPath("1.pdf"); Document doc = new Document(); PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(newFile, FileMode.Create)); // Metadata doc.AddCreator("PDF Printer by Joachim Tesznar"); doc.AddTitle("New PDF Document"); // Add content doc.Open(); sw.Write(GetMailBodyOrderDetails().ToString()); doc.Add(new Paragraph(sw.ToString())); doc.Close(); } #region string GetMailBodyOrderDetails() public string GetMailBodyOrderDetails() { StreamReader StmRdr1 = null; FileInfo fi1 = null; string strFileName1 = Request.PhysicalApplicationPath + "Registration.html"; fi1 = new FileInfo(strFileName1); if (fi1.Exists) { StmRdr1 = File.OpenText(strFileName1); StreamReaderStrLine1 = StmRdr1.ReadToEnd(); // StreamReaderStrLine1 = StreamReaderStrLine1.Replace("<TITLE>", ListingName).Replace("<PRICE>", Price.ToString()).Replace("<DESCRIPTION>", ListingDetail).Replace("<EMAIL>", Email).Replace("<COUNTRY>", Country).Replace("<STATE>", State).Replace("<SUBURB>", City).Replace("<TOPADS>", "No"); StreamReaderStrLine1 = StreamReaderStrLine1.Replace("\r\n", ""); StreamReaderStrLine1 = StreamReaderStrLine1.Replace("<!--body", ".body").Replace("}-->", "}").Replace("\t", ""); } return StreamReaderStrLine1; } #endregion please reply Thanks Raj
-
Generate PDF file -
Google AnalyticThanks for reply! This is how to add tracing code but I want to know that how can I show dashboard report in my webpage same as google dashboard.
-
Google AnalyticHi All, I have a asp.net website. There are two area one is front-end and another is admin area. I use google analytic in front-end pages and I need show google analytic report in my admin area as web statistic. My question is that how can I show the google analytic report in my admin section. What is the script, how to use this. I check google forum, but could not understand. please help..... Thanks Rajesh
-
how do I show google analytics report in my web pageHi All, I have a asp.net website. There are two area one is front-end and another is admin area. I use google analytic in front-end pages and I need show google analytic report in my admin area as web statistic. My question is that how can I show the google analytic report in my admin section. What is the script, how to use this. I check google forum, but could not understand. please help..... Thanks Rajesh
-
How do I get a aspx page function in App_code class file in asp.net 2.0.How do I get a aspx page function in App_code class file in asp.net 2.0. please sent a demo code.