|
So I've got these UpdatePanel(s):
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel runat="server" id="UpdatePanel" updatemode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger controlid="UpdateButton2" eventname="Click" />
</Triggers>
<ContentTemplate>
<asp:Label runat="server" id="DateTimeLabel1" />
<asp:Button runat="server" id="UpdateButton1" onclick="UpdateButton_Click" text="Update" />
<asp:Label runat="server" id="statusSpan"/>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" id="UpdatePanel1" updatemode="Conditional">
<ContentTemplate>
<asp:Label runat="server" id="DateTimeLabel2" />
<asp:Button runat="server" id="UpdateButton2" onclick="UpdateButton_Click" text="Update" />
<asp:Label runat="server" id="statusSpan2"/>
</ContentTemplate>
</asp:UpdatePanel>
And I've got this code behind:
protected void UpdateButton_Click(object sender, EventArgs e)
{
DateTimeLabel1.Text = DateTime.Now.ToString();
DateTimeLabel2.Text = DateTime.Now.ToString();
statusSpan.Text="FIRED BY (blahblahblahbeeddy blah)";
}
As you can see (the 'blah blah blabbeddy bla' section), I'd like to somehow have the codebehind either catch, be aware of, or report back what Element fired or called the codebehind method. Is this possible?
|
|
|
|
|
cknight725 wrote: object sender
have you looked at the sender at all? apply GetType() or ToString() to it once, to discover what it is; when it is something you can handle, cast ir to its actual type and use it any way you like.
|
|
|
|
|
Thanks!! It was staring me right in the face probably for much longer than I'd care to admit. For completeness, and perhaps to help others out this is my solution:
protected void UpdateButton_Click(object sender, EventArgs e)
{
System.Web.UI.WebControls.DropDownList caller = (System.Web.UI.WebControls.DropDownList)sender;
string senderSrc=caller.ID.ToString();
if (senderSrc=="DropDown1")
{
{
else
{
}
}
|
|
|
|
|
You're welcome.
|
|
|
|
|
I'd like to query a 64bit OS with my 32bit OS and see how the 64bit OS actually stores bits or bytes.
Does the OS stuff 8 bytes into each double long, to a point that if you do not have a multiple of 8 with the number of bytes you need for your string, you have 1 or more empty bytes in the last double long? Are all strings just byte arrays with terminating 0's?
|
|
|
|
|
I'm no expert on this, but...
turbosupramk3 wrote: Are all strings just byte arrays with terminating 0's?
That's likely language/framework dependent. In .net, strings are not NULL-terminated (and may include NULLs).
turbosupramk3 wrote: stuff 8 bytes into each double long
I'm fairly sure that only applies to registers. Or when defining a structure.
Why do you ask? It probably shouldn't matter to everyday programming.
|
|
|
|
|
This isn't every day programming, I'm converting a 64 bit to a 32 bit D word
|
|
|
|
|
None of that made sense. What do you really want?
|
|
|
|
|
|
|
Thanks for helping me through this Eddy, I've got it working now
I can return a hex or decimal value of a Dword
|
|
|
|
|
Cool; hope to see an article on it soon
Bastard Programmer from Hell
|
|
|
|
|
Check the other thread for code (as well as anyone that comes up with this in a search), I don't think I'm qualified for writing an article, but I'd be happy to do so
|
|
|
|
|
turbosupramk3 wrote: Check the other thread for code
Nice, thanks for sharing
turbosupramk3 wrote: I don't think I'm qualified for writing an article, but I'd be happy to do so
Why wouldn't you qualify?
I'd imagine that some people would be very happy if they find an article with the code to download and some explanatory text on the problem being solved. It's quite painless actually, especially with the template[^].
Bastard Programmer from Hell
|
|
|
|
|
I'm self taught and haven't been writing code that long, so I guess that is why I wrote that. I've read those articles before and those people are geniuses!
I'll try and clean up the class and check out the template though, thank you for that link. I'm guessing it will then be peer reviewed and cleaned up if needed.
|
|
|
|
|
turbosupramk3 wrote: I've read those articles before and those people are geniuses!
Some of them are, no doubt. Everything is hard, until it's solved - you didn't get that much responses to your query, did you?
turbosupramk3 wrote: I'll try and clean up the class and check out the template though, thank you for that link. I'm guessing it will then be peer reviewed and cleaned up if needed.
Cool - and yes, and then it'll be out in the public.
Bastard Programmer from Hell
|
|
|
|
|
How do I change the pixel format of any input image to any other pixel format for eg convert to grayscale , true color RGB , paletted(8bpp) , grayscale with alpha , true color with alpha(RGA32).
Any C#.Net solution for the above?
Regards,
Shailesh H
|
|
|
|
|
|
pleasse give me the name of some book for C# beginer
|
|
|
|
|
Not a problem, there are many listed here[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
|
these are really nice links for beginners...thats the reason of my vote 5.
|
|
|
|
|
|