473,395 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

mystery!

I have a Control like that
===
public class BlogMonthList : Control, IPostBackEventHandler
{
protected override void Render(HtmlTextWriter writer)
{
writer.WriteLine(" <a href=\"{0}\">{1}</a><br/>",
Page.ClientScript.GetPostBackClientHyperlink(this, "addblog"),
strings.AddBlog);
}
public void RaisePostBackEvent(string eventArgument)
{
switch (eventArgument)
{
case "addblog":
// do something
break;
}
}
}
===
Now I have a breakpoint in RaisePostBack(), when I click the link, RaisePostBack is never called.
How could that be?
Is there some extra steps I have been missing?

--
I have taken a vow of poverty. If you want to really piss me off, send me money.

Jan 11 '06 #1
3 1264
BTW I have check if I don't mess up with control ID, but the Control's id is the same at each query or postback....
"Lloyd Dupont" <net.galador@ld> wrote in message news:eA**************@TK2MSFTNGP09.phx.gbl...
I have a Control like that
===
public class BlogMonthList : Control, IPostBackEventHandler
{
protected override void Render(HtmlTextWriter writer)
{
writer.WriteLine(" <a href=\"{0}\">{1}</a><br/>",
Page.ClientScript.GetPostBackClientHyperlink(this, "addblog"),
strings.AddBlog);
}
public void RaisePostBackEvent(string eventArgument)
{
switch (eventArgument)
{
case "addblog":
// do something
break;
}
}
}
===
Now I have a breakpoint in RaisePostBack(), when I click the link, RaisePostBack is never called.
How could that be?
Is there some extra steps I have been missing?

--
I have taken a vow of poverty. If you want to really piss me off, send me money.

Jan 11 '06 #2
This Hyperlink is in a UserControl of my owne creation (in C# code).
If I create the hyperlink outside the box it works.

Now I have followed all the steps to correctly create my container control... mysterious...
"Lloyd Dupont" <net.galador@ld> wrote in message news:eA**************@TK2MSFTNGP09.phx.gbl...
I have a Control like that
===
public class BlogMonthList : Control, IPostBackEventHandler
{
protected override void Render(HtmlTextWriter writer)
{
writer.WriteLine(" <a href=\"{0}\">{1}</a><br/>",
Page.ClientScript.GetPostBackClientHyperlink(this, "addblog"),
strings.AddBlog);
}
public void RaisePostBackEvent(string eventArgument)
{
switch (eventArgument)
{
case "addblog":
// do something
break;
}
}
}
===
Now I have a breakpoint in RaisePostBack(), when I click the link, RaisePostBack is never called.
How could that be?
Is there some extra steps I have been missing?

--
I have taken a vow of poverty. If you want to really piss me off, send me money.

Jan 11 '06 #3
Found it!
My templated (C#) container control was not an INamingContainer itself!
"Lloyd Dupont" <net.galador@ld> wrote in message news:eA**************@TK2MSFTNGP09.phx.gbl...
I have a Control like that
===
public class BlogMonthList : Control, IPostBackEventHandler
{
protected override void Render(HtmlTextWriter writer)
{
writer.WriteLine(" <a href=\"{0}\">{1}</a><br/>",
Page.ClientScript.GetPostBackClientHyperlink(this, "addblog"),
strings.AddBlog);
}
public void RaisePostBackEvent(string eventArgument)
{
switch (eventArgument)
{
case "addblog":
// do something
break;
}
}
}
===
Now I have a breakpoint in RaisePostBack(), when I click the link, RaisePostBack is never called.
How could that be?
Is there some extra steps I have been missing?

--
I have taken a vow of poverty. If you want to really piss me off, send me money.

Jan 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Red | last post by:
In netscape bookmark files, there are lots of lines like this: <DT><A HREF="http://www.commondreams.org/" ADD_DATE="1091500674" LAST_CHARSET="ISO-8859-1" ID="rdf:#$uiYyb3">Common Dreams</A> I...
12
by: Raymond Hettinger | last post by:
For your amusement and edification, I'm working on a series of Python puzzles designed to highlight areas of the language known only to those who have read the docs more than once. Each of the...
0
by: Francis Avila | last post by:
A few days ago (see the 'itertools.flatten()?' thread from October 28) I became obsessed with refactoring a recursive generator that yielded the leaves of nested iterables. When the dust settled,...
0
by: Morris Carré | last post by:
Back then - in particular, soon after 9/11 - I evidenced the natural irony of the standard python implementation, by showing it had the clear and spontaneous humor of replying : 'BUSH' when...
3
by: Jim Geissman | last post by:
I have function that returns a table of information about properties. The data comes from three different tables -- addresses (called PropertyID), property characteristics, and events concerning...
5
by: BLaci | last post by:
Please take a look at the following drop in ad: http://www.traficdublu.ro/dev/dropin.htm The script is written in the http://www.traficdublu.ro/dev/amcuceba.js . I want to call the dropin.htm...
0
by: William Wisnieski | last post by:
Hello Everyone: I'm having a very strange problem occurring with my Access 2000 database. I call it the "mystery record." Here's the story: I have a query by form that returns a record set...
115
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical...
14
by: jojoba | last post by:
Hi, I hope this post is ok for this group. Here's my deal: I have two computers on my LAN at home. One desktop. One laptop. Both computers are wireless enabled (and wired enabled too). I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.