 |
|
|
|
|
Welcome to the Sexy and Funny Forums forums.
You are currently viewing our forums as a guest which gives you very limited access to what we have to offer. By joining our community you will have access to post replies/topics, communicate privately with other members (PM), respond to polls, remove some of the ads and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
|
Bored? Go watch girls get naked on cam for free!
|
|
|
|
 |
|
08-04-2012, 03:47 AM
|
#21
|
|
Snoochie Boochies
Join Date: Oct 2008
Location: Leonardo, New Jersey
Posts: 1,482
Casino Cash: $4835
My Mood:
|
+10
Quote:
|
Originally Posted by polstand
...
|
this creates 30 buttons each with its own counter value (substituted with a loop variable) and shows how each one will go to the appropriate page
again this assumes that you know the counter value when creating the panel and hyperlink, which as i said before you original code appears that this is true
and there is always more than one way to do something
HTML Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="HTMLPanel" runat="server">
</asp:Panel>
</div>
</form>
</body>
</html>
PHP Code:
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { for (int i = 100; i < 130; i++) { Button p = new Button(); HTMLPanel.Controls.Add(p); p.Height = Unit.Pixel(55); p.Width = Unit.Pixel(396); p.BorderStyle = BorderStyle.Solid; p.BorderWidth = Unit.Pixel(2); p.BorderColor = System.Drawing.Color.Blue; p.Click += new EventHandler(p_Click); p.ID = i.ToString(); p.Text = "Actions"; } }
void p_Click(object sender, EventArgs e) { Button p = sender as Button; Response.Redirect("http://forums.sexyandfunny.com?ID=" + p.ID); } }
__________________
"When government fears the people, there is liberty. When people fear the government, there is tyranny." - Thomas Jefferson
Last edited by SilentBob : 08-04-2012 at 03:53 AM.
|
|
|
08-04-2012, 04:04 AM
|
#22
|
|
I live on these forums, you get out!
Join Date: Jul 2007
Posts: 958
Casino Cash: $35606
My Mood:
|
Quote:
|
Originally Posted by SilentBob
Quote:
|
Originally Posted by polstand
...
|
this creates 30 buttons each with its own counter value (substituted with a loop variable) and shows how each one will go to the appropriate page
again this assumes that you know the counter value when creating the panel and hyperlink, which as i said before you original code appears that this is true
and there is always more than one way to do something
HTML Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="HTMLPanel" runat="server">
</asp:Panel>
</div>
</form>
</body>
</html>
PHP Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
for (int i = 100; i < 130; i++)
{
Button p = new Button();
HTMLPanel.Controls.Add(p);
p.Height = Unit.Pixel(55);
p.Width = Unit.Pixel(396);
p.BorderStyle = BorderStyle.Solid;
p.BorderWidth = Unit.Pixel(2);
p.BorderColor = System.Drawing.Color.Blue;
p.Click += new EventHandler(p_Click);
p.ID = i.ToString();
p.Text = "Actions";
}
}
void p_Click(object sender, EventArgs e)
{
Button p = sender as Button;
Response.Redirect("http://forums.sexyandfunny.com?ID=" + p.ID);
}
}
|
trying that now, as soon as I figure out why my SQL connection is not working
|
|
|
08-04-2012, 04:47 AM
|
#23
|
|
I live on these forums, you get out!
Join Date: Jul 2007
Posts: 958
Casino Cash: $35606
My Mood:
|
+10
Quote:
|
Originally Posted by SilentBob
Quote:
|
Originally Posted by polstand
...
|
this creates 30 buttons each with its own counter value (substituted with a loop variable) and shows how each one will go to the appropriate page
again this assumes that you know the counter value when creating the panel and hyperlink, which as i said before you original code appears that this is true
and there is always more than one way to do something
HTML Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="HTMLPanel" runat="server">
</asp:Panel>
</div>
</form>
</body>
</html>
PHP Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
for (int i = 100; i < 130; i++)
{
Button p = new Button();
HTMLPanel.Controls.Add(p);
p.Height = Unit.Pixel(55);
p.Width = Unit.Pixel(396);
p.BorderStyle = BorderStyle.Solid;
p.BorderWidth = Unit.Pixel(2);
p.BorderColor = System.Drawing.Color.Blue;
p.Click += new EventHandler(p_Click);
p.ID = i.ToString();
p.Text = "Actions";
}
}
void p_Click(object sender, EventArgs e)
{
Button p = sender as Button;
Response.Redirect("http://forums.sexyandfunny.com?ID=" + p.ID);
}
}
|
This does work, but still has one little snag I will work out. Thank you
|
|
|
08-04-2012, 08:42 AM
|
#24
|
|
Snoochie Boochies
Join Date: Oct 2008
Location: Leonardo, New Jersey
Posts: 1,482
Casino Cash: $4835
My Mood:
|
+20
Quote:
|
Originally Posted by moose
...
|
i really should get the answer for this, my answer fixed the problem, not told op to search the web
__________________
"When government fears the people, there is liberty. When people fear the government, there is tyranny." - Thomas Jefferson
|
|
|
08-04-2012, 08:58 PM
|
#25
|
|
I live on these forums, you get out!
Join Date: Jul 2007
Posts: 958
Casino Cash: $35606
My Mood:
|
+10
Quote:
|
Originally Posted by SilentBob
Quote:
|
Originally Posted by moose
...
|
i really should get the answer for this, my answer fixed the problem, not told op to search the web 
|
it won't let me change it or I would.
|
|
|
08-05-2012, 12:47 PM
|
#26
|
It's funny not fumpy 
Join Date: Nov 2005
Posts: 10,102
Casino Cash: $92252
My Mood:
|
+20
Quote:
|
Originally Posted by polstand
Quote:
|
Originally Posted by SilentBob
i really should get the answer for this, my answer fixed the problem, not told op to search the web 
|
it won't let me change it or I would.
|
did it for you
__________________
tim cheats at roulette.
|
|
|
08-05-2012, 01:47 PM
|
#27
|
|
Why don't I have a Custom Title by now? Seriously?
Join Date: Dec 2010
Location: Crown of Aragon
Posts: 1,624
Casino Cash: $499
My Mood:
|
+10
*takes notes*
|
|
|
08-05-2012, 05:03 PM
|
#28
|
|
I live on these forums, you get out!
Join Date: Jul 2007
Posts: 958
Casino Cash: $35606
My Mood:
|
Quote:
|
Originally Posted by mOOse
Quote:
|
Originally Posted by polstand
it won't let me change it or I would.
|
did it for you 
|
thanks
|
|
|
 |
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Users Who Have Viewed This Thread In The Last 7 Days: 0
|
|
There are no names to display.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
All times are GMT. The time now is 10:17 PM.
|