Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

Jens Meyer

@Jens Meyer
About
Posts
24
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to session value in a page.
    J Jens Meyer

    May i ask why you want to achieve something like that? Since your Page inherits from base type Page it allways should have access to the Session-Property. One thing you can try is to implement a BasePage-class that inherits from Page. In this class you set the access to Session as a private Member. e.g.:

    private HttpSessionState Session
    {
    get{return base.Session;}
    }

    But i dont know if this will work.

    When in trouble, when in doubt, run in circles, scream and shout

    C# tutorial

  • Read columns and sheets in Excel and Save to DB
    J Jens Meyer

    Hi, try to take a look at the following topic: linked servers. With them you can access excel files like a database. Every sheet is its own table. Alternatively you can try to read the file using oledb-driver or ADO.Net Regards Jens

    When in trouble, when in doubt, run in circles, scream and shout

    ASP.NET database tutorial

  • HttpContext.Current.Server.MapPath
    J Jens Meyer

    Hi KishoreT, if i understand you right, you have the xml-file in a subdirectory of the root of the webpage. The subdirctory is "Configuration". Therefore i suggest you use the following to get the path:

    HttpContext.Current.Server.MapPath(@"~\Configuration\xyz.xml");

    The difference is the ~ (tilde) character. It represents the homedirectory or root of the webapp. Hope this helps Regards Jens

    When in trouble, when in doubt, run in circles, scream and shout

    ASP.NET help csharp visual-studio sysadmin debugging

  • How could i analyze and do something to a webpage content?
    J Jens Meyer

    Dear xianlong, i assume you have a couple of rules, for example how to translate a link or a specific string. So you have to replace the link and words in the stream according to the rules you have made. For example you translate all addresses in the output stream by replacing the '.' with htt://www.example.com. To do so i would suggest to use reguar expressions. Using RegEx you can get a set of matches and do the same translations for each of the matches. Since you have different tasks (relative path to absolute paths and translations of specific words) i would also suggest to use a different httpmodule for each of them. Im afraid i cant give you any real examples to use since i dont know all the details of you task. But replacements can be achieved quite easily using regular expressions. Regards Jens

    When in trouble, when in doubt, run in circles, scream and shout

    ASP.NET html com tutorial question

  • How could i analyze and do something to a webpage content?
    J Jens Meyer

    Hi xianlong, maybe you should take a look into HttpModules. You can find many articles here on codeproject on that topic. You can alter the result stream (your html code for example) in this module just like the way you want with the proxy. Regards Jens

    When in trouble, when in doubt, run in circles, scream and shout

    ASP.NET html com tutorial question

  • Restricting class creating only 3 objects
    J Jens Meyer

    Use a Singleton-like approach. Make the constructor private and add a static method. In this method return a new instance of the class when a static counter is less than 3 (starting with 0). Then increment the counter. If the counter is >2 do what ever you like to do if the third instance is delivered. Small example: public class MyRestrictedClass { private static int instanceCounter = 0; private MyRestrictedClass() { //cool ctor stuff } public MyRestrictedClass GetNextInstance() { if(instanceCounter<=2) { instanceCounter++; return new MyRestrictedClass(); } throw new Exception("Maximum number of instances exceeded."); } } Best regards Jens

    When in trouble, when in doubt, run in circles, scream and shout

    modified on Thursday, May 27, 2010 3:18 AM

    C# csharp help

  • HttpWebRequest simultaneously!!!!
    J Jens Meyer

    Try threading with BackgroundWorker, Threads or CCR. I have done it myself on a recent project using CCR. But at first instance i suggest you give the BackgroundWorkers a shot. Regards Jens

    When in trouble, when in doubt, run in circles, scream and shout

    C# database sysadmin algorithms help question

  • generating CustomerID
    J Jens Meyer

    Dear Kolisa, have you tried something like that: int currentMax = CustomerID.Max(customer => int.Parse(CustomerID.Substring(4, 3)))+1; I assume you use c# as your choosen language in version 3.x. If not, pls specifiy your problem in more detail. Besides, i suggest to give your variables more distinguished names. Have an array with name CustomerID of type CustomerID is a little bit confusing. Also int.Parse on a substring without null checks or length checks is quite dangerous. Regards Jens

    When in trouble, when in doubt, run in circles, scream and shout

    .NET (Core and Framework) sales

  • C# Help
    J Jens Meyer

    Do you mean item templates, where you can create reusable code files for instance? Take a look at this link to get the idea: http://msdn.microsoft.com/en-us/library/tsyyf0yh%28v=VS.80%29.aspx[^] Best regards Jens

    When in trouble, when in doubt, run in circles, scream and shout

    C# csharp help question

  • How to Block Specific IP Number to Access my website
    J Jens Meyer

    Hi, optional you can build a ASP.NET HTTP-Module to have your very own, custom made IP filtering.

    When in trouble, when in doubt, run in circles, scream and shout

    ASP.NET tutorial

  • performance issue
    J Jens Meyer

    In addition to other ideas I would suggest to fire up a profiler like the one from redgate (ants profiler it is, i believe) to see what takes so long to render your page.

    When in trouble, when in doubt, run in circles, scream and shout

    ASP.NET performance architecture help question

  • Loop through and process every php code.
    J Jens Meyer

    Im not very sure about real code for you now, but i suggest you should take a look into Regualar Expressions. Regular expressions let you identify portions of strings, characters or even patterns of strings in given source strings (e.g. tag-like structures). You can even replace strings of an expressed pattern in a given source string. .Net supports Regular Expressions since the earliest versions. I guess it will suffice. Ask Mr. Google about examples of regular expressions... Sory bro, that I cannot give you any real code. However, i hope my answer leads you to a solutions. Best regards Trollpower

    C# tutorial php testing beta-testing tools

  • Listbox DrawItem Decorator
    J Jens Meyer

    Hello, I'd like to write a decorator for a ListBox that draws the items in a ListBox on its own (e.g adding a border). More or less items dont need to be decorated and in these cases i want to use the default drawing routine for the particular item (e.g when specific conditions are not met). So I'd like to know how i can call the default drawing routine from within the DrawItem-Event in case i dont want to draw the item on my own. Is there a way to skip the owner drawing of an item? Thanks for any help on this. Best regards Trollpower

    Windows Forms css graphics help question

  • Class with symbol [modified]
    J Jens Meyer

    I think what Navaneeth tried to ask is, why is the Stack class implementing the IEnumerable Interface twice?!? Honestly I dont know either...

    C# question html com data-structures

  • Crystal reports without using database/dataset in vb.net 2005
    J Jens Meyer

    What exactly do you mean with "make"? If you mean to create the template you can use xml/xsl files (see here: developerfusion[^] or see here: devarticles[^]) in order to drag and drop the content to its place in the report. If you mean "bind the data to the report" with "make" it depends on what do you want to display in the report. If you have a table of some sort to display, i dont know any other way to bring the data to the report than using DataSets or a DataBase Connection. If you want to display static data (like a single name, a single date for instance, you can use the following piece of code to insert static text into prior defined fields in the report: ReportDocument doc; doc = new ReportDocument(); doc.Load(reportFileName); ((CrystalDecisions.CrystalReports.Engine.TextObject)doc.ReportDefinition.Sections["YOUR_SECTION_NAME_WHERE_THE_FIELD_IS_LOCATED"].ReportObjects["FIELD_NAME_OF_THE_GIVEN_SECTION"]).Text = YOURNEWFIELDVALUE; I hope this helps, let me know if you still have issues... Best regards Trollpower

    Visual Basic csharp database help question

  • GridView ItemTemplate different location?
    J Jens Meyer

    Dear Chetan, thank you very much for your kind help. That was exactly what i needed. Man, you made my day :) Thanks again Jens

    ASP.NET csharp asp-net help question

  • GridView ItemTemplate different location?
    J Jens Meyer

    Hi Chetan, thanks for your answer. So when i get this right, you suggest to generate the template columns dynamically? When do i have to do this (After databinding for instance) and do i do it? Best regards Jens

    ASP.NET csharp asp-net help question

  • GridView ItemTemplate different location?
    J Jens Meyer

    Hello, I'm using ASP.NET 2.0. I have to make a Gridview containing a couple of buttons. I inserted the buttons using ItemTemplates. When the GridView is rendered to the client the ItemTemplates containing the buttons are allways placed to the left hand of the gridview and the data is placed right of the buttons. Is it possible to put the ItemTemplates/Buttons to the right hand side of the GridView and the data to the left hand side? Thanks for any help on this. Best tregards Jens

    ASP.NET csharp asp-net help question

  • ASP.NET and AJAX
    J Jens Meyer

    Hello, i downloaded the new Ajax 1.0 Framework from Microsoft which has been released yesterday or so. Since all the nice ControlExtensions are based on Javascript id like to make some adjustments to them. For instance i planned to have inverted rounded corners in addition to the other ones. My question is, how can i edit the Javascripts, which are located on my harddisk. I'd like to include these "new" Javascripts in my project instead of the orignial ones. Can anyone give me some advice on this? Best regards Jens

    ASP.NET question csharp javascript asp-net

  • Asynchronous Webservice call and abort
    J Jens Meyer

    Hi, i need to make a call to a webservice and in addition abort this call if the response exeeds some specific time. I want to do this because i have to provide a method to the user which returns a value from a webservice through this method not through some callbackevent. This way i decided that it would be a good way to wrap the call to the service in a method, wait for the response (or a specific time, whatever comes first) and return the value to the user. What i have done so far is that i make a call to XXXAsync, hooked up to the return event and set a flag that the webservice responded. In the method called by the user a wait for this flag to be set to true or a specific time, but somehow the webservice return event never fires. If i remove the waiting loop everything works fine. Here is some sample code of the method i want to wrapt the webservice call in: public float FaceImageQuality(Image faceImage) { this.retrievedFaceQuality = -10; this.faceQualityCheckReturned = false; fvws.FaceQualityAsync(ImageToByteArr(faceImage)); int localCounter = 0; while (localCounter < this.maxWaitTime || this.faceQualityCheckReturned) { localCounter++; Thread.Sleep(100); } if (!this.faceQualityCheckReturned && localCounter >= this.maxWaitTime) throw new Exception(String.Format(this.webServiceDidNotResponded, (this.maxWaitTime * 10), "FaceImageQuality")); return this.retrievedFaceQuality; } private void fvws_FaceQualityCompleted(object sender, FaceValidationClass.FaceValidationWebService.FaceQualityCompletedEventArgs e) { this.retrievedFaceQuality = e.Result; this.faceQualityCheckReturned = true; } When i remove the Thread.Sleep call and the loop off the code the event fires, but only after the method is left. Does anyone knows a way to solve this? Best regards Jens

    C# question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups