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
S

Sled Dog

@Sled Dog
About
Posts
31
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Shortcut keys
    S Sled Dog

    Hello Everyone, I am wondering if it is possible to use F9, F10, F11, & F12 as a shortcut key in my web application. I know that IE reserves some of them, but the client would find it useful if we could apply them for the application purpose rather than using Alt+Character. Has anyone accomplished this without using a 3rd party add-in product? Thanks for the thoughts-in advance. SD

    C# question discussion

  • shortcuts in web app
    S Sled Dog

    Hello Everyone, I am wondering if it is possible to use F9, F10, F11, & F12 as a shortcut key in my web application. I know that IE reserves some of them, but the client would find it useful if we could apply them for the application purpose rather than using Alt+Character. Has anyone accomplished this without using a 3rd party add-in product? Thanks for the thoughts-in advance. SD

    Visual Basic question discussion

  • framework 2.0 and visual studio 2003: compatible?
    S Sled Dog

    Thanks for the info. William

    C# csharp asp-net visual-studio sysadmin help

  • framework 2.0 and visual studio 2003: compatible?
    S Sled Dog

    Can you use framework 2.0 with visual studio 2003? I just ran a bunch of service packs and installed framework 2.0. Now, I open an C# web app and I get an error: "Visual Studio .NET has detected that the specified web server is not running ASP.NET version 1.1." "You will be unable to run ASP.NET web applications or services" I did the aspnet_regiis.exe -i and thought that 2003 would be compatible. Am I wrong or is there something that I need to change in my solution or project file? Thanks Much. Will

    C# csharp asp-net visual-studio sysadmin help

  • Update on Grid fails?
    S Sled Dog

    Yeah, I am not sure what the "real" answer was to this. I threw it all away, used the MS example from help--then, added my code back in. I could post it upon request. Thanks Anyway. William :)

    Visual Basic css database question discussion announcement

  • Update on Grid fails?
    S Sled Dog

    I don't understand this one... Almost everything works except the Update on the grid: Delete, Cancel, Edit* If I take the Load_Grid out of m_dgIDs.EditCommand--I have to click the Edit link twice for it to turn into a textbox that I can edit, but the original content is not there. If I leave the Load_Grid in the EditCommand, the textbox will appear immediately with the cell's content and I can edit it. HOWEVER, the grid no longer appears to be bound and this line blows up: Dim id As Integer = CType(e.Item.Cells(0).Text, Integer) e.Item.Cells(0).Text is = "" or nothing I tried to keep this code to a MIMIMUM because I know it is a lot to ask of forum members, but if someone has the time, I would appreciate any thoughts on the subject. Thanks - A Lot. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not IsPostBack Then Load_DropDown() End If End Sub Private Sub m_ddFacility_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles m_ddFacility.SelectedIndexChanged Load_Grid() End Sub Private Sub dgIDs_Update(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Handles m_dgIDs.UpdateCommand 'ID is just a simple class that interfaces with the database & has 3 properties 'CostCenterID, FacilityID, & Description...pretty trivial Dim oCostCenter As New ID Dim id As Integer = CType(e.Item.Cells(0).Text, Integer) oCostCenter.Load(id) oCostCenter.Description = CType(e.Item.Cells(2).Text, String) oCostCenter.FacilityID = m_ddFacility.SelectedValue oCostCenter.Update() Load_Grid() m_dgIDs.EditItemIndex = -1 End Sub Private Sub dgIDs_Edit(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Handles m_dgIDs.EditCommand m_dgIDs.EditItemIndex = e.Item.ItemIndex Load_Grid() End Sub Private Sub dgIDs_Delete(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Handles m_dgIDs.DeleteCommand Dim oCostCenter As New ID Dim id As Integer = CType(e.Item.Cells(0).Text, Integer) oCostCenter.Load(id) oCostCenter.Delete() Load_Grid() End Sub Private Sub dgIDs_Cancel(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Handles m_dgIDs.CancelCommand m_dgIDs.EditItemIndex = -1 Load_Grid() End Sub Private Sub Load_Grid() Dim ds As DataSet Dim oData_Dev As New CFormData("DefaultConnectionString") ds = oData_Dev.GetDataSet("SELECT * FROM CostCenter WHERE FacilityID =

    Visual Basic css database question discussion announcement

  • Saving dynamic content?
    S Sled Dog

    And, I have "most" of the anwser... First, I created a User Control. Then, I created: public void Save_Content(). Next, I went back to the parent page where the control is placed. I created a Save button there. The click event does the following: private void btnSave_Click(object sender, System.EventArgs e) { m_oLIFTable.Save_Content(); } Also, I created a reference to the User Control where all my other controls are defined: protected LoanTrak.WebForms.Controls.LIFTable m_oLIFTable; The reason that I say "most" of the answer is because the page doesn't quite write the table of these dynamic date objects correctly. The first time through, as you chose a customer off of the parent page dropdown, the grid is filled out correctly. However, subsequent choices create the correct number of rows in this dynamic table, but the information from the previous choice is not completely cleared out. I will work on that...Unless, someone has an idea? Thanks. Sled Dog :~

    C# design question learning

  • Saving dynamic content?
    S Sled Dog

    Forum Folks, I cannot get my mind around the catch-22 I am in. I have added a text box to the page dynamically as expressed in the code below. The user may change the contents of that textbox. However, when the user clicks on the Save button, the page is rewritten and, of course, the textbox is rewritten: the content is gone. How do you save the content of a dynamic control before the page is rewritten? TIA, Sad Dog :sigh: //add the Filing Date td = new TableCell(); txt = new TextBox(); if (dr["Filing"] == DBNull.Value) { txt.Text = ""; } else { dtTemp = Convert.ToDateTime(dr["Due"]); txt.Text = dtTemp.ToShortDateString(); }; txt.Width = System.Web.UI.WebControls.Unit.Pixel(75); td.Controls.Add(txt); tr.Controls.Add(td);

    C# design question learning

  • call a method on a parent form
    S Sled Dog

    LongHC, Thank you very much for the solution. Per you comment, it depends...In the land of Knights and Knaves, where Knights always tell the truth and Knaves always lie, you could not be a Knight and a Knave would never offer the truth--therefore, you must be a Paradox. William

    C# question hardware

  • call a method on a parent form
    S Sled Dog

    Members, I have a user control embedded on a single form. The form has a pubic method that I created. I want this child control to notify the parent page when new data is entered in to a text field on the user control. I want to keep the user control responsible for only the information that it is gathering. However, I want this parent page notified when new records are created. How do I pass the record id as a string from the embedded control to the public function on the parent page? Thanks for the thought... SD

    C# question hardware

  • Persistence
    S Sled Dog

    Rob, first, let me really thank you for assisting so much. Problem solved because of your additional questions... Your right, line 102 wasn't useful...I was just grabbing at straws. The answer was, I did not realize that you had to add the dataset to the session dictionary with an "alias" name in order to access it: Session.Contents.Add("Myds", ds); Thank you again...the code below works fine! William private void Page_Load(object sender, System.EventArgs e) { DataSet localDS = (DataSet)Session.Contents["Myds"]; dd1.DataSource = localDS; dd1.DataTextField = "Name"; dd1.DataValueField = "ID"; dd1.DataBind(); ... protected void Session_Start(Object sender, EventArgs e) { DataSet ds = new DataSet(); DataRow dr; ds.Tables.Add("Test"); ds.Tables[0].Columns.Add(); ds.Tables[0].Columns[0].ColumnName = "Name"; ds.Tables[0].Columns.Add(); ds.Tables[0].Columns[1].ColumnName = "ID"; dr = ds.Tables[0].NewRow(); dr[0] = "Test1"; dr[1] = 1; ds.Tables[0].Rows.Add(dr); dr = ds.Tables[0].NewRow(); dr[0] = "Test2"; dr[1] = 2; ds.Tables[0].Rows.Add(dr); Session.Contents.Add("Myds", ds); ...

    C# question database

  • Persistence
    S Sled Dog

    Rob, thank you for the response. This sounds like exactly what I want. However, I tried this and I keep running into a problem. First, I whipped up a simple dataset in the Global.ASAX file. Then, I debugged it on a page load. When my page loads, the localDS is set to a new DataSet (per the code snippets below); however, line 103 executes and the localDS becomes . So, what do you think is wrong with... ???localDS = (DataSet)Session.Contents["ds"]; Is there something special that is done in the declaration of ds in the GLOBAL file? Thanks. William protected void Session_Start(Object sender, EventArgs e) { DataSet ds = new DataSet(); DataRow dr; ds.Tables.Add("Test"); ds.Tables[0].Columns.Add(); ds.Tables[0].Columns[0].ColumnName = "Name"; ds.Tables[0].Columns.Add(); ds.Tables[0].Columns[1].ColumnName = "ID"; dr = ds.Tables[0].NewRow(); dr[0] = "Test1"; dr[1] = 1; ds.Tables[0].Rows.Add(dr); dr = ds.Tables[0].NewRow(); dr[0] = "Test2"; dr[1] = 2; ds.Tables[0].Rows.Add(dr); ... 100 private void Page_Load(object sender, System.EventArgs e) 101 { 102 DataSet localDS = new DataSet(); 103 localDS = (DataSet)Session.Contents["ds"]; ...

    C# question database

  • Persistence
    S Sled Dog

    Okay, I have a better question. How do you make a dataset persist between page refreshes without executing your query over and over? Thanks. SD

    C# question database

  • "Public Shared" equivalent in VB & Global
    S Sled Dog

    Forget it. This was a bad question. I simply put a public dataset on the page of interest and read the XML into the dataset on if (!PostBack). Thanks anyway. Sd

    C# sysadmin xml question discussion

  • "Public Shared" equivalent in VB & Global
    S Sled Dog

    I found the answer to my tranlation question. There is a nice site that does translations back and forth between VB & C#: http://www.carlosag.net/Tools/CodeTranslator/Default.aspx; however, I would still be interested in any response to my GLOBAL question. Thanks again, Sd

    C# sysadmin xml question discussion

  • "Public Shared" equivalent in VB & Global
    S Sled Dog

    I have a set of XML files that I parse & put into a dropdown list. I don't want to read this set of files off the network every time the page loads. I was considering establishing a data set in the GLOBAL.ASAX file in the Session section. I would just bind that dataset on the page load for this one dropdown where it occurs in the application. NOW, I know I will hear some "purist" objections to using anything that sounds like a global variable, but it seems far more efficient than reading 100+ XML files every time the page loads for every user. I have tried creating a dataset in the Session_Start, but it isn't clear how I would access it. Any thoughts? Also, I am curios if there is an equivalent to a variable declared on a page in VB "Public Shared MyInt As Integer"? Thanks. SD

    C# sysadmin xml question discussion

  • Property Builder?
    S Sled Dog

    Thanks...I was afraid of that. William

    C# csharp question

  • Property Builder?
    S Sled Dog

    Is there a property build for a DataGrid in a C# Windows Application? I have used this feature when building web applications, but it does not appear to be present as I am building a Windows application and want to do a basic layout for my datagrid without manually constructing the data columns and features. Thanks. SD

    C# csharp question

  • Page_Unload question
    S Sled Dog

    Tom, the flood lights just went on. Thanks for the terminology seperation, too. Page_Unload is not what I needed at all. Best Regards, William

    C# question csharp visual-studio sysadmin performance

  • Page_Unload question
    S Sled Dog

    Am I missing something about how Visual Studio works? Page_Unload is executed the first time that I open a page. Is this designed to be this way? I thought that by its name, this method would be executed when the server removes the page from memory...not loading the page into memory. And, "yes" I can already see something of a conflict within my own statement. The Page_Unload method must be read into memory before the server can run it...but, that does not imply it should execute...does it? Any commentary to improve my understanding would be appreciated. Thanks. SD

    C# question csharp visual-studio sysadmin performance
  • Login

  • Don't have an account? Register

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