|
|
This forum is for article requests and ideas only.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have following code snippet at page load event.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Button1.Attributes.Add("onclick", "alert('hello')");
Button2.Click += new EventHandler(Button2_Click);
}
}
button1 display the alert message when we click on that.
But when i click on button2, it doesn't fire Button2_Click event. Why?
Althouh if i comment "if (!IsPostBack)" line, the code working fine.
hello
|
|
|
|
|
Arrgggh. This is an ASP.NET question, yet this is PLAINLY NOT an ASP.NET forum? Are you planning on writing an article on this, or did you just randomly click on the links.
Anyway, because I'm still in vaguely a good mood, I'll answer it. The simple fact is that a web form is stateless, so you need to reattach the event handlers EACH TIME you post back.
|
|
|
|
|
then why Button1 click event fire without attaching again?
hello
|
|
|
|
|
shecool wrote: then why Button1 click event fire without attaching again?
That's not a server side event handler.
|
|
|
|
|
shecool wrote: then why Button1 click event fire without attaching again?
Because you are not capable of (including to make a good choice of correct technical forum) programming.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
Wrong forum. For potentially better success in the future, pick the correct forum
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi all,
can any1 suggest me material(pdf or word) on MOSS 07 which i can download via net ?
T.Balaji
|
|
|
|
|
Has a google search turned up anything?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Did your ISP put a blanket ban on search engines?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
Sarky. Very sarky. I like it.
|
|
|
|
|
I've just created a new thread-safe generic pseudo-Event class called DelegLink. I'd be happy to write it up if it's worthwhile; if it's silly then I won't bother. I'm not totally keen on the identifier names I've chosen; let me know if some other names would be better.
Anyway, is this thing brilliant, useful, silly, or horrible?
A DelegLink object holds a thread-safe collection of objects wishing to receive pseudo-events. Objects may subscribe at any time; simultaneous subscriptions will always succeed. Each object in the DelegLink holds an optional Tag (a plain Object).
Class DelegLink
Function Subscribe(Subscriber As Object, Tag As Object) As DelegLink
' Subscribes an object. Returns a DelegLink that may be used to unsubscribe
Sub Unsubscribe()
' Invoking Unsubscribe on a deleglink returned by an earlier call to Subscribe
' will cancel the subscription.
Sub Exec(Of T)(Param as T)
' Invokes DelegLink.iAct.Act(of T)(Param, Tag, SendLink) on all subscribers
' that implement it. Subscribers whose Act() returns True will be unsubscribed.
Interface iAct(of T)
Function Act(Param as T, Tag as Object, SendLink as DelegLink) As Boolean
End Interface
Readonly Property Base As DelegLink
End Class
A DelegLink holds weak references to its subscribers; subscribers that are garbage-collected will be unsubscribed without incident. Strong references are held to Tag, but those references will go away after an object is unsubscribed.
Because it is necessary to type-check each object to see if it supports iAct(of T) and type-cast the ones that do, I would expect that DelegLink to be slower than the Event facility in .net. On the other hand, it does offer some advantages including thread safety and object tags.
|
|
|
|
|
Sounds interesting, go for it
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Certainly sounds interesting. I think as long as you include why you needed such a class and some information on the drawbacks (such as the possible performance hit) I would say go for it.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
I just finished what I think is an interesting solution for updating a SharePoint list using an external data source and SSIS. I am considering writing this up and submitting as an article. Since I did this pretty much within the confines of SSIS, there is little or no code to publish. I would write this as a how-to with generous use of screen shots.
Would it be appropriate or even welcome to submit an article without code to download?
Thanks.
Henderson Consulting
www.mohenderson.com
|
|
|
|
|
There isn't a way to save/export the SSIS package (or whatever they're called now) to a file? Either way, it would probably make a decent article.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
I can save/export etc. I was thinking it wouldn't add any more value than what can be demonstrated with illustrations. What I was able to pull off was done completely within the GUI, and I didn't write any code other than a simple update and insert statement. What I've seen out there in my research involves a far bit of custom classes. What I had in mind is a more comprehensive version of what I generally see in blog posts. The difference is I don't presently write a blog.
Henderson Consulting
www.mohenderson.com
|
|
|
|
|
It still sounds like it would make for a decent article. Articles are generally better if they have source code, but I don't think it's a requirement.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Fair point. I'll try and include a sample SSIS package to go along with what I write.
Henderson Consulting
www.mohenderson.com
|
|
|
|
|
Hello,
I've downloaded the PdfLibrary from this article:
http://www.codeproject.com/KB/dotnet/PdfLibrary.aspx#xx2493698xx[^]
And without changing anything I've execute the code like the description tells. The pdf is created but when opening the file I got the Error, that the token 0,384 was not found. And the pdfDocument is one empty page.
The code is posted some years ago, is there a pdf-reader version problem?
Has someone testet this, or can test it and tell me if there is the problem too?
I would be glad if someone could tell...
greetings
Adriane
|
|
|
|
|
Hi,
welcome to CodeProject.
If you post same question to the bulletin board below the article, the author will get an e-mail
notification and may answer you.
Anyway, there has been at least one happy user[^] this month!
|
|
|
|
|
Email the author of the article, they may be able to help you.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I am going to be using a WM device and do not like the way the WM RDP client works and i want to create my own with a w other features and a better navigation system. Can you help me get started.
vb.net
Thanks
|
|
|
|
|
First step is going to be posting this question in the right forum. This is for article requests and ideas, not programming questions. Ask this in one of the programming forums or even the general discussion forum.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|