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

JohnQuar1

@JohnQuar1
About
Posts
32
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • RFI
    J JohnQuar1

    I have a side project I am working on at home and I need help developing it. Is there a location on this site that allows me to post my ideas and requirements, and potentially hire someone / get estimates to work on this with me? I initially thought about the Jobs section, but that is more for a full time position vs this project I am working on. Thanks for your time. JM John Michael

    Web Development visual-studio business help question

  • Close form after buttonclick
    J JohnQuar1

    If you've got the time, could you give me a quick example on how to do this, or where I can find an example? I havent really used AJAX much. Thanks! BTW, The code behind is in C#.

    John Michael

    ASP.NET csharp javascript question

  • Close form after buttonclick
    J JohnQuar1

    Hello, I am trying to close a form after a button click event, but I need it to run some code first. I know about OnClientClick="javaScript:window.close(); return false;" and that successfully closes the window, but I need to be able to run some code behind in C# before that executes. I currently have this for my button: It asks if I want to close the window, but never gets to the onclick event. Does anyone have any ideas? Thanks for your time. JM

    John Michael

    ASP.NET csharp javascript question

  • Linkbutton, Target="_blank"
    J JohnQuar1

    No, I did not. I'm not even sure what onevote is.

    C# tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    I found a solution. I ended up changing the link buttons to links and passed a variable through the link, then grabbed the variable and stored it to the session variable I was using in a Page_PreInit function. Send it from first page: Receive on second page:

    protected void Page_PreInit(Object sender, EventArgs e)
    {
    Session["Owner"] = Request.QueryString["Owner"];
    }

    Thanks for your help guys.

    C# tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    I found a solution. I ended up changing the link buttons to links and passed a variable through the link, then grabbed the variable and stored it to the session variable I was using in a Page_PreInit function. Send it from first page: Receive on second page:

    protected void Page_PreInit(Object sender, EventArgs e)
    {
    Session["Owner"] = Request.QueryString["Owner"];
    }

    Thanks for your help guys.

    ASP.NET csharp tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    So I'm a little confused, does this.ClientScript.RegisterStartupScript(this.GetType(), "aa", "window.open(\"~/SampleDashboardDetails.aspx?s=" + Session["Owner"].ToString() + "\");", true); go on the page I am trying to open in the page load? Thanks. JM

    ASP.NET csharp tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    I agree with you, and I would write some small javascript to do this, but I need to pass that session variable as well. The page I am trying to open has a gridview that has a session variable parameter as an input, so I need to pass the session before the page loads so that the gridview is immediately populated.

    ASP.NET csharp tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    Hello, I have a couple of link buttons and I am trying to get them to open a page in a new window. I know how to do this with a normal link, but I also have some very simple code behind that I need to run (Set a session variable). I am writing this in C#, and have had no luck getting the page to open with the session variable passed. Let me know if you have any suggestions, or if you know how to do this through a normal link. Thanks for your time. C# Code

    protected void lnkEnterprise_Click(object sender, EventArgs e)
    {
    Session["Owner"] = 1;
    Response.Redirect("~/SampleDashboardDetails.aspx");
    }

    JM

    ASP.NET csharp tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    OK, I'll post the question over there. Thanks anyway for your help.

    C# tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    OK, but its a C#.Net question, is it not? Thats why I thought this forum was more appropriate.

    C# tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    Yes, it is ASP.NET. I was trying to open the page using C# and w/o javascript. I've spent all day trying to figure it out to no avail. When I do the lnkBtnEnterprise.Attributes.Add("target", "_blank"); and click the button on the page, I get an error of "Microsoft JScript runtime error: Object expected"

    C# tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    I also tried putting lnkBtnEnterprise.Attributes.Add("Target", "_blank"); on the page load event.

    C# tutorial

  • Linkbutton, Target="_blank"
    J JohnQuar1

    Hey, I have a couple of link buttons and I am trying to get them to open a page in a new window. I know how to do this with a normal link, but I also have some very simple code behind that I need to run (Set a session variable). I've tried to add attributes to the linkbutton by doing lnkBtnEnterprise.Attributes.Add("Target", "_blank"); but that doesnt seem to do anything. Let me know if you have any suggestions. Thanks for your time.

    protected void lnkBtnEnterprise_Click(object sender, EventArgs e)
    {
    lnkBtnEnterprise.Attributes.Add("Target", "_blank");
    Session["Owner"] = 1;
    Response.Redirect("~/SampleDashboardDetails.aspx");
    }

    JM

    C# tutorial

  • Edit Item Template, Dropdown list
    J JohnQuar1

    Hello, I currently have two dropdown lists in an edit item template and I have hard coded the values for the lists. The Item Template is a label that would read the value that was selected. That value would when be sent to a database. When I hit edit, the dropdown lists appear, and I change the value. When I hit update, the Item Templates do not update with the selected values, and when I hit edit again, the values are back to the default, not what I selected. Can someone help me figure out how to fix this? The code is below, thanks for your time.

    <asp:GridView ID="GridView_Service_Tower_Configuration_Options"
    runat="server" AutoGenerateColumns="False"
    DataSourceID="DS_Configuration_Options" CellPadding="4"
    GridLines="None" Width="600px"
    DataKeyNames = "category" ForeColor="#333333">
    <RowStyle BackColor="#EFF3FB" />
    <Columns>
    <asp:CommandField ShowEditButton="true" />
    <asp:BoundField DataField="category" HeaderText="Service Tower"
    SortExpression="Category" ReadOnly="True"/>
    <asp:CheckBoxField DataField="include" HeaderText="New Service Provider"
    SortExpression="include" >
    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
    </asp:CheckBoxField>
    <asp:TemplateField HeaderText="Transition Year"
    SortExpression="Transition Year">
    <EditItemTemplate>

                                <asp:DropDownList ID="drpTransitionYear" runat="server" Width="70px">
                                    <asp:ListItem>2010</asp:ListItem>
                                    <asp:ListItem>2011</asp:ListItem>
                                    <asp:ListItem>2012</asp:ListItem>
                                    <asp:ListItem>2013</asp:ListItem>
                                    <asp:ListItem>2014</asp:ListItem>
                                </asp:DropDownList>
    
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("purchase\_year") %>'></asp:Label>
    
    ASP.NET help database wpf sysadmin tutorial

  • Is it possible to run a function when the red x is clicked?
    J JohnQuar1

    This is a real stupid question, but when I open the script, is it technically javascript? So would I write and then write your code? By the way, I'm my website is in C# Thanks! You've been a big help!</x-turndown>

    ASP.NET question

  • run a function before exiting a web application
    J JohnQuar1

    Hello, I am wondering if there is some functionality with the upper right exit button when it is pushed. I need to do a check to make sure that a button was pushed (save button) before they close the browser. I wasn't sure if there was some code I could run in the code behind to do this or not. Thanks! John Michael

    C#

  • Is it possible to run a function when the red x is clicked?
    J JohnQuar1

    Hello, I am wondering if there is some functionality with the upper right exit button when it is pushed. I need to do a check to make sure that a button was pushed (save button) before they close the browser. Is this possible? Thanks! John Michael

    ASP.NET question

  • How to set the x & y axis fontsize in MSChart
    J JohnQuar1

    Its got a FontFamily, but once again, its a get property, does not have any set properties. I'll see if I can tinker with it some more and figure it out. Thank for your help! JM

    C# help graphics tutorial question

  • How to set the x & y axis fontsize in MSChart
    J JohnQuar1

    That makes sense, but I'm not sure how to do that b/c TitleFont is not a type. Could you give me an example?

    C# help graphics tutorial 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