Click here to Skip to main content
15,906,816 members
Home / Discussions / C#
   

C#

 
GeneralRe: Remove Databinding Pin
thachil21-Jan-08 21:51
thachil21-Jan-08 21:51 
GeneralWrong ToString being called Pin
Jordanwb21-Jan-08 13:07
Jordanwb21-Jan-08 13:07 
GeneralRe: Wrong ToString being called Pin
J$21-Jan-08 13:46
J$21-Jan-08 13:46 
GeneralRe: Wrong ToString being called Pin
Jordanwb21-Jan-08 14:42
Jordanwb21-Jan-08 14:42 
GeneralRe: Wrong ToString being called Pin
Luc Pattyn21-Jan-08 14:40
sitebuilderLuc Pattyn21-Jan-08 14:40 
GeneralRe: Wrong ToString being called Pin
Jordanwb21-Jan-08 14:43
Jordanwb21-Jan-08 14:43 
GeneralRe: Wrong ToString being called Pin
Luc Pattyn21-Jan-08 15:43
sitebuilderLuc Pattyn21-Jan-08 15:43 
GeneralProblem with master pages Pin
garrywh21-Jan-08 11:31
garrywh21-Jan-08 11:31 
I'm having a strange problem in my project that I do not understand.

I have a bunch of buttons in a master page that every page uses. When the user presses return in one of my search field (to query data) in a page that uses it, the page_load of the master page fires, and for some reason, the first button is being somehow clicked and the user is redirected to the page of the first button in the master.

Here is the code in my master page:

void Page_Load(object sender, System.EventArgs e)
{
string path;

if (!IsPostBack)
{
path = Request.Url.Host;

// If the user_id was not set, this means that the Default.aspx form
// was not run and no valid credentials. Redirect user back to the Default page to validate
// credentials. If running on a local host, don't worry as this is the developer.

if (path != "localhost")
{
if (Session["user_id"] == null)
{
Response.Redirect("Default.aspx");
}
}
}
return;
}

protected void test()
{
return;
}

protected void imgbtn_accounts_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("AccountList.aspx");
}

imgbtn_accounts_Click is always being activated.

Here is the asp code in the master page:

asp:ImageButton ID="imgbtn_accounts" Tabindex="1" style="position:absolute; left: 270px; top: 41px;" ImageUrl="~/Images/Accounts.gif" runat="server" OnClick="imgbtn_accounts_Click" />

When I take away the OnClick="imgbtn...", the behavuior goes away but then my imgbtn_accounts becomes useless.

Does anyone have any idea why this is occurring?

Thanks,

Garry
GeneralI need help with C# loops Pin
Alex50121-Jan-08 10:47
Alex50121-Jan-08 10:47 
GeneralRe: I need help with C# loops Pin
Pete O'Hanlon21-Jan-08 11:16
mvePete O'Hanlon21-Jan-08 11:16 
GeneralRe: I need help with C# loops [modified] Pin
PIEBALDconsult21-Jan-08 11:33
mvePIEBALDconsult21-Jan-08 11:33 
GeneralRe: I need help with C# loops Pin
Colin Angus Mackay21-Jan-08 14:26
Colin Angus Mackay21-Jan-08 14:26 
GeneralRe: I need help with C# loops Pin
PIEBALDconsult21-Jan-08 15:27
mvePIEBALDconsult21-Jan-08 15:27 
GeneralRe: I need help with C# loops Pin
Colin Angus Mackay21-Jan-08 14:40
Colin Angus Mackay21-Jan-08 14:40 
GeneralRe: I need help with C# loops Pin
PIEBALDconsult21-Jan-08 16:11
mvePIEBALDconsult21-Jan-08 16:11 
GeneralRe: I need help with C# loops Pin
Colin Angus Mackay21-Jan-08 21:32
Colin Angus Mackay21-Jan-08 21:32 
GeneralRe: I need help with C# loops Pin
PIEBALDconsult22-Jan-08 5:08
mvePIEBALDconsult22-Jan-08 5:08 
GeneralRe: I need help with C# loops Pin
Guffa21-Jan-08 22:19
Guffa21-Jan-08 22:19 
GeneralRe: I need help with C# loops Pin
PIEBALDconsult22-Jan-08 6:39
mvePIEBALDconsult22-Jan-08 6:39 
GeneralRe: I need help with C# loops Pin
Guffa22-Jan-08 9:02
Guffa22-Jan-08 9:02 
GeneralRe: I need help with C# loops Pin
Gareth H21-Jan-08 11:38
Gareth H21-Jan-08 11:38 
GeneralRe: I need help with C# loops Pin
Guffa21-Jan-08 13:20
Guffa21-Jan-08 13:20 
GeneralRe: I need help with C# loops Pin
PIEBALDconsult21-Jan-08 16:19
mvePIEBALDconsult21-Jan-08 16:19 
JokeRe: I need help with C# loops Pin
Guffa21-Jan-08 22:01
Guffa21-Jan-08 22:01 
GeneralPostMessage Problem Pin
stebo072821-Jan-08 9:02
stebo072821-Jan-08 9:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.