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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

MarkMokris

@MarkMokris
About
Posts
72
Topics
50
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Basic Questions About ASP.NET
    M MarkMokris

    Okay Christian. Thanks! Mark

    ASP.NET csharp question html asp-net sysadmin

  • Basic Questions About ASP.NET
    M MarkMokris

    I really appreciate your help Christian. To avoid more confusion, let me restate my question. I have a fairly involved ASP.NET application in VS2005 which creates dynamic controls. I have a problem in which after a while some OnClicks stop working. I have tried everything and believe I have read every article I can find about viewstate and the ASP.NET page lifecycle. I still don't know what is wrong. I did notice that there are no __EVENTTARGET and __EVENTARGUMENT hidden fields are being created, yet every funamental article on ASP.NET says they will be created. So, I created the SIMPLEST application I could as a test. Even in the SIMPLEST website with one Button server control and an OnClick event, still no __EVENTTARGET and __EVENTARGUMENT hidden fields are created. Is there an explanation? Thanks, Mark

    ASP.NET csharp question html asp-net sysadmin

  • Basic Questions About ASP.NET
    M MarkMokris

    I find this response very curious. I have read many, many articles about viewstate and page lifecycle. About init phase, page load phase etc. I am writing a fairly involved application in which I am creating some dynamic controls. It works well to a point and then some simple OnClicks just stop working. I have struggled for quite a while trying to explain this. At this point, I was wondering why I see no _EVENTTARGET and __EVENTARGUMENT fields, like some many articles tell me to expect. Maybe this is a symptom of a large problem?? It amazes me how so many times respondees on this forum must point out how little the poster knows. Sorry to imply I know so little about ASP.NET. I guess I actually know more than I implied. Could somebody be kind enough to address my original question? Thanks, Mark

    ASP.NET csharp question html asp-net sysadmin

  • Basic Questions About ASP.NET
    M MarkMokris

    I am still learning about ASP.NET. I have read many articles on the Internet about how ASP.NET creates hidden field __EVENTARGUMENT and __EVENTTARGET. I am using VS2005, ASP.NET 2005 (I suspect w/VS2005) and C#. I create the simplest test web site with one Button as a server control and an OnClick handler. I examine the source it generates in Internet Explorer. I see NO __EVENTARGUMENT and __EVENTTARGET fields in the HTML source. Where are they? There is an __EVENTVALIDATION field. If I use the EnableEventValidtion="false" then it disappears. But never do I see the __EVENTARGUMENT and __EVENTTARGET in the HTML. What is going on? Thanks! Mark

    ASP.NET csharp question html asp-net sysadmin

  • Rendering and Viewing Source in ASP.NET
    M MarkMokris

    I am trying to create an ASP.NET app using C# in VS 2005. I have a number of fixed Panels in the HTML, that I dynamically populate with server controls as the user utilizes the application. I have noticed that as I populate some of the panels dynamically, the controls render okay. But I do View Source in Internet Explorer and the generate HTML markup for the dynamically-generated controls is no where to be found in the source. However, they are there, rendered on the page. Does that make sense? Shouldn't I always be able to see the generated HTML from ASP.NET? Thanks, Mark

    ASP.NET csharp html asp-net visual-studio sysadmin

  • Question About Storing Objects in the Session Variable
    M MarkMokris

    Thanks Rob. I didn't realize that events must be relinked at postback. Since these "MyPanels" are created dynamically, I guess the viewstate doesn't handle that for me and I will have to relink the events myself? That is how I am interpreting what you are saying. I am still learning about ASP.NET. I will investigate static objects. Maybe that is what I need to use. Thanks, Mark

    ASP.NET csharp question asp-net

  • Question About Storing Objects in the Session Variable
    M MarkMokris

    Thanks for the responses. To Rob...My MyPanel objects are objects on the page that are being dynamically created at runtime. Therefore at runtime, various user actions cause MyPanel objects to be created. When they are instantiated, the code links up click events for the buttons within. Since these dynamic MyPanel objects must persist between post-backs, my thought was to store them in an Array-List which is stored in the Session object. It works well, but I find the Click events no longer work after I pull them out of the Session object after the post-back. I must relink the Click events at that time. I am just wondering why. Thanks, Mark

    ASP.NET csharp question asp-net

  • Question About Storing Objects in the Session Variable
    M MarkMokris

    In an ASP.NET C# application, I have a class called "MyPanel" derived from Panel. MyPanel contains a Button with a Click event. The click event is handled in the MyPanel class. When I store any MyPanel objects in the Session variable and retrieve them on a postback, the Click events seem to disappear. When the user clicks a Button inside the MyPanel object, a postback happens, but the click events don't get executed. I have to "relink" the click handlers when I retrieve the MyPanel objects from Session. I am using InProc Session mode. I had though I could store even complex objects in the Session variable. But I lose the events in the objects. Is this explainable? Thanks, Mark

    ASP.NET csharp question asp-net

  • Multiple Code Files in ASP.NET Project
    M MarkMokris

    In my Visual 2005 ASP.NET project I would like to break up my _Default C# code behind file into multiple .aspx.cs code files. Can I do that? How do I do that? I would like to declare _Default partial classes in multiple code files. Normally in a windows app I could just declare the same class as a partial class in multiple files. However, when I try this in ASP.NET I get a conflict error at compile time. Thanks! Mark

    ASP.NET csharp question asp-net help

  • ASP.NET AJAX 1.0 Cannot Get Started
    M MarkMokris

    I thought that is what I was trying to add. I downloaded the Toolkit and installed it. All it appeared to do was add some files to C:\Program Files. What else am I supposed to do?

    ASP.NET csharp asp-net visual-studio design question

  • ASP.NET AJAX 1.0 Cannot Get Started
    M MarkMokris

    I am trying to learn something about the AJAX controls available for ASP.NET. I am using VS 2005. I download the install for ASP.NET AJAX 1.0. It completes and creates a directory C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025. From there I try to Browse from my VS Toolbox "Add Items". When I browse for System.Web.Extensions.dll, I get a few ScriptManager Controls. However, when I browser for System.Web.Extensions.Design.dll or AJAXExtensionsToolbox.dll, I get a message that there are no controls in the DLL to be added to the Toolbox. Yet, I thought that there are supposed to be 30 or more AJAX controls that should be added. What am I doing worng? Thanks! Mark

    ASP.NET csharp asp-net visual-studio design question

  • Click on GridView Column Header
    M MarkMokris

    How can I capture a single or double click on the heaer over a column in an ASP.NET Gridview? Thanks, Mark

    ASP.NET question csharp asp-net

  • Basic Question About Executing ASP.NET App Outside Visual Studio
    M MarkMokris

    I am just learning ASP.NET. I have an ASP.NET application that I developed in Visual Studio. It contains some GrdiViews, and all works well when I execute the application within Visual Studio using F5. However, when I try to execute the application from Internet Explorer using: http://localhost/FirstExperiment I get a HTTP 403 Message saying: The website declined to show this webpage HTTP 403 Most likely causes: This website requires you to log in. What am I missing or not doing correctly? Thanks!!! Mark

    ASP.NET csharp question asp-net visual-studio learning

  • Fundamental ASP.NET Question
    M MarkMokris

    I have been more of a C# desktop programmer. This is a pretty fundamental ASP.NET question. I realize that all post-backs to a ASP.NET page cause the page to be reloaded. Therefore: 1. Any variables I create global to the page class will be re-initialized with each post-back. Is that correct? 2. Does that mean that nothing really persists from post-back to post-back? 3. What about if I set up a SQLDataSource at design time and bind it to a GridView. Is the SQLDataSource reconnecting and rerunning the SQL with every post-back? Even post-backs that do not involve the GrdiView? Thanks, Mark

    ASP.NET csharp question asp-net database design

  • GridView - PageIndexChanging not handled
    M MarkMokris

    I am using the following code to populate a GridView in protected void Button1_Click(object sender, EventArgs e) { String selectCommand = "select top 1000 claimid, formtype, status, totalpaid, paiddate from claim"; SqlDataAdapter ad = new SqlDataAdapter(selectCommand, SqlDataSource1.ConnectionString); DataTable dt = new DataTable(); ad.Fill(dt); GridView1.DataSource = dt; GridView1.DataBind(); } This works, but I have AllowPaging = true, and the first time I click the "Next Page" button, I get a "PageIndexChanging not handled" exception. I have not setup a PageIndexChanging handler, but I didn't think I had to in this case. BTW, when I populate by just setting the GridView1.DataSourceID to a SQLDataSource, the problem does not occur. Paging works fine. What am I doing wrong? Thanks! Mark

    ASP.NET help question workspace

  • Windows Forms Flickering
    M MarkMokris

    I have a C# Windows Forms app in which there are a number of Panels containing standard controls like PictureBox'es, Buttons and Labels. At runtime, I allow the user to drag-and-move the panels to reposition them where he/she likes. I programmed my own drag-around logic using MouseDown, MouseMove, and MouseUp. While the user drags the Panels around, there is considerable unpleasant flickering. Where does the flickering come from? Anything I can do to eliminate it? THANKS! Mark

    Windows Forms csharp winforms question

  • Simple MouseEnter MouseLeave Events
    M MarkMokris

    In a C# Windows Forms app, I have a Panel containing some Labels and Pictureboxes. I have set up delegates at the Panel level to handle MouseEnter and MouseLeave Events. I want something to happen when the user moves the mouse into the Panel and out of the Panel. However, the Panel MouseEnter and MouseLeave Events are firing when the mouse moves into and out of any of the Pictureboxes and Labels within the Panel. I don't want this behavior. I want them to fire only when the mouse moves into the Panel and out of the Panel. What am I doing wrong? Thanks, Mark

    .NET (Core and Framework) csharp winforms question

  • DataGridView SelectionMode Property
    M MarkMokris

    It seems that with the DayaGridView SelectionMode property I can only select one selection mode like FullRowSelect or FullColumnSelect. But I would like the ability to select either a full column or a full row. Just like in a Excel spreadsheet. Is this possible or not? Thanks, Mark

    .NET (Core and Framework) question

  • Context Menu Strips
    M MarkMokris

    I have a Windows Form ContextMenuStrip that I use with several controls on my form. The menu items themselves are instances of ToolStripMenuItem. I handle the Click event for each ToolStripMenuItem. My problem is that inside the Click event, the sender is the ToolStripMenuItem, and I seemingly have no way of telling which control was originally right-clicked. I know which menu item was right-clicked, but I don't know the original control that was right-clicked. I hate to create separate instances of ContextMenuStrip, since it is the same menu for all the controls I am working with. How do I "pass-along" the a reference to the original control to the ToolStripMenuItem? Thanks, Mark

    C# question help

  • Trapping a Keystroke
    M MarkMokris

    Thanks. But then, is there anyway to trap a keystroke before it appears in the textbox? What if I needed to prohibit certain special characters from being typed? Thanks again! Mark

    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