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
C

chubbysilk

@chubbysilk
About
Posts
41
Topics
26
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • <Input type='image'> posts back automatically
    C chubbysilk

    Hello, I noticed that when I have an input type of image (html control) it automatically posts back when I click it, even though I am not running it as a server control. But a regular input button (html control) does not automatically post back. Does anybody know why the image input posts back? Is there another way to do create a client side image button that will not automatically post back? Any insight on how this stuff works is greatly appreciated. Thanks, RC

    ASP.NET html sysadmin question

  • Page posting back twice
    C chubbysilk

    Hello, For some reason, when one particular button on a web page is clicked, the page posts back twice. Does anybody have any idea what would cause this? Here are some specifics about my code: I have 2 buttons. One button is an invisible server control button. The other is a visible html button. When the html button is clicked, I want it to run the postback code for the other button if certain conditions are met. function CheckParams() { if(head==false) { alert("Please select a heading."); } else { __doPostBack('SaveImp', ''); } } In general, the code works. I just can't figure out what would make the post back happen twice. Thanks, RC

    ASP.NET html sysadmin question lounge

  • Using the Command Prompt in C# Win App
    C chubbysilk

    Hello, I am writing a C# windows application. I would like to open a command prompt and execute a few lines of code. I am able to open the command prompt using the following code: System.Diagnostics.Process.Start("cmd.exe"); But I don't know how to actually write a command to the prompt once it is open. Can anyone help me out? Thanks, RC

    C# csharp help tutorial question

  • Run client script after postback
    C chubbysilk

    Yep, that's what I would like to do.

    ASP.NET javascript sysadmin tools question

  • Run client script after postback
    C chubbysilk

    Hello, I would like to post back to the server, set a few session variables there, and then run a javascript function on the client side which redirects a particular frame. Essentially I want to run some client script after posting back. Is that possible? Thanks, RC

    ASP.NET javascript sysadmin tools question

  • Download file from server to client
    C chubbysilk

    I put the file in a temp folder at the root level of the application. Code as follows: Download Instead of downloading the file, it just opened and displayed it in the browser. RC

    ASP.NET sysadmin tutorial question

  • Download file from server to client
    C chubbysilk

    Hello, I would like the client to be able to click a button and download a particular file off the server. Does anyone know how to do this? I was unable to find any good examples/documentation. Thanks, RC

    ASP.NET sysadmin tutorial question

  • Custom server control is posting back twice
    C chubbysilk

    I figured out what the problem was. My server control was inheriting from the System.Web.UI.WebControls.WebControl, which i assume was causing an AutoPostBack in addition to the PostBack that I was forcing through the javascript written in the Render function. I changed it so that the server control now inherits from the System.Web.UI.WebControls.Control class. It no longer posts back twice when a button is clicked. RC

    ASP.NET html design sysadmin question

  • Custom server control is posting back twice
    C chubbysilk

    Hello, I have built a custom server control with a few buttons in it. The first time I push a button in the control, it runs the code twice. Does anybody have any idea why? If I push the same button again, it only runs the code once. Here is the main code for the control: using System; using System.Web.UI; using System.Web.UI.WebControls; using System.ComponentModel; namespace TitleBar { /// /// Summary description for TBar. /// [DefaultProperty("Text"), ToolboxData("<{0}:TBar runat=server>")] public class TBar : System.Web.UI.WebControls.WebControl, IPostBackDataHandler, IPostBackEventHandler { public event EventHandler SaveClick; /// /// Render this control to the output parameter specified. /// /// The HTML writer to write out to protected override void Render(HtmlTextWriter output) { System.String quote = System.Convert.ToChar(34).ToString(); System.Text.StringBuilder SBOut = new System.Text.StringBuilder(); SBOut.Append(" Here is the code in the webpage: `protected TitleBar.TBar TBar1; private void Page_Load(object sender, System.EventArgs e) { TBar1.SaveClick +=new EventHandler(testSaveClick); } public void testSaveClick(object sender, System.EventArgs e) { // some code }` It seems like the RaisePostBackEvent function is being called twice the first time the page posts back. But I can't figure out why this is happening. Thanks, RC

    ASP.NET html design sysadmin question

  • Run code in page from custom server control
    C chubbysilk

    Hello, I have created a server control with several buttons. When particular buttons in the control are pushed, I would like to execute code from a corresponding method in the parent page. Does anybody know how to accomplish this? So far, I can raise a postback event and specify code to be run in the actual control. Thanks, RC

    ASP.NET sysadmin tutorial question

  • Prevent scrolling for part of page w/o using frames
    C chubbysilk

    Hi, Is there anyway to allow one part of a page to scroll while keeping the other part in place without using frames? For example, I have a menu bar at the top of the page. When I scroll down to see the data displayed, the menu disappears (as it should). I would like the menu to always appear at the top of the page. Any ideas? Thanks, RC

    ASP.NET tutorial question

  • Display Flash(*.swf) file
    C chubbysilk

    Hello, Can anyone direct me to a good article on how to display a flash file in my aspx page? Thanks, RC

    Web Development adobe tutorial question

  • Javascript confirm() not working
    C chubbysilk

    I think the reason my code was not working is because I was attempting to run server script from the client in the <%DeleteAccount()%> line of the code. I found a different way to make it work using the javascript doPostBack function. Thanks for your input! RC

    Web Development javascript html sysadmin tools question

  • Javascript confirm() not working
    C chubbysilk

    Hello, When the user pushes a button, I would like to pop up a dialog box which asks them if they would like to continue or not. It the user chooses to continue, then the code on the server will run. I attempted to do this using the Javascript confirm() method. Here is my script: function ConfirmDelete() { var msg = "Are you sure you want to delete the account?"; if(confirm(msg)) { <%DeleteAccount();%> } } Here is the html: For some reason, the code in the ConfirmDelete function is being called immediately when the page loads (this includes the DeleteAccount server code), instead of just when the button is pushed. Is there something wrong with my code? Or, is there a different way to do this? Thanks, RC

    Web Development javascript html sysadmin tools question

  • Buttons in DataGrid not working
    C chubbysilk

    That was it. I was re-binding the datagrid in the Page_Load. Thanks for your help!! RC

    ASP.NET html design sysadmin question

  • Buttons in DataGrid not working
    C chubbysilk

    That code is already in the InitializeComponent() method. But it still doesn't work.

    ASP.NET html design sysadmin question

  • Buttons in DataGrid not working
    C chubbysilk

    Hi, I am creating a datagrid with a column of buttons. I thought I set it up so that when a button is pushed the DataGrid1_ItemCommand is called, but for some reason it is not working. Here is my html code: And here is my server code: public void DataGrid1_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { Label2.Text = "asdfasedfasdf"; } Similar code works on other pages. Am I missing something? Thanks, RC

    ASP.NET html design sysadmin question

  • Datagrid buttons not working
    C chubbysilk

    I actually got it working in a slightly different manner using "e.Item.DataSetIndex". Here is the code I used. public void DataGrid1_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e){ Session ["Variable"] = dataSet1.Tables["Data"].Rows[e.Item.DataSetIndex]["ID"].ToString(); } Thanks for your help!!

    ASP.NET help tutorial question

  • Datagrid buttons not working
    C chubbysilk

    Hello, I am creating a column of buttons for a datagrid which is bound to a dataset. Some columns of the dataset are not being displayed in the datagrid. When I click a button in the datagrid, I would like to retrieve some information from a hidden column of that particular row of the dataset. Does anyone know how to do this? Is there any way to pass this information? Thanks for your help, RC

    ASP.NET help tutorial question

  • Dynamically created table disappears after postback
    C chubbysilk

    yes, EnableViewState is true.

    ASP.NET 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