|
How we can create image button control dynamically ?
|
|
|
|
|
ImageButton button = new ImageButton();
button.Id = "something"; add this button to a panel or place holder.
|
|
|
|
|
Masood Kochi,SSF wrote: How we can create image button control dynamically ?
Create object of ImageButton,Set require properties and add in the page
for example
ImageButton imgBtn=new ImageButton();
imgBtn.ID="imgBtn";
imgBtn.ImageUrl="imagePath";
//Add image button in page.Suppose You have put one panel control on the page and ID is pnl
pnl.Controls.Add(imgBtn);
please don't forget to vote on the post that helped you.
|
|
|
|
|
Ok ..Thanks
but How wecan raise click event on that image button
|
|
|
|
|
Masood Kochi,SSF wrote: but How wecan raise click event on that image button
Write this line to create Event
imgBtn.Click += new ImageClickEventHandler(imgBtn_Click);
This is event of Image Button
public void imgBtn_Click(object sender, ImageClickEventArgs e)
{
}
please don't forget to vote on the post that helped you.
|
|
|
|
|
May not work - unless the button is created early enough, it won't exist when the viewstate tree is restored.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Christian Graus wrote: May not work
It'll work on page load event also.I worked on it many times
please don't forget to vote on the post that helped you.
|
|
|
|
|
Really ? Are you using .NET 3.5 ? I am using 2.0 and have found problems with this, I've also done it many times, but I had to create my controls in the loadviewstate event.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
This is trivial, the hard part is capturing viewstate from this control ( won't happen if you create it in page load, or later )
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
HI,
is there any way to detect that what kind of value is there in an .csv file rows??
thanks
Vijay V.
Yash Softech
|
|
|
|
|
Hi All,
I have a requirement that I need to show some data in an HTML Page,
since I have to get dynamically, I am getting into an aspx page.
But I have to show that data in an HTML Page.
How can I achive this..?
Reply soon..
Thanks,
Anand
|
|
|
|
|
What possible reason could you have for needing an 'HTML' page instead of an 'aspx' page ? An aspx is an engine for creating HTML, so you've got your html, your only issue is that it as a different file extension on the browser. Why does that matter ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
My 5 for this. Somebody down voted you for giving him an answer and trying to help. Possibly it's the OP.
|
|
|
|
|
Probably - I gave an answer requiring thought and knowledge of programming.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
U can take a ASP Panel Control or div tag on HTML Page and at the runtime u can assign data to that panel.
Hope this helps u...
|
|
|
|
|
ASP.NET 2.0 wrote: U can take a ASP Panel Control or div tag on HTML Page
No. It's not possible. Those are server controls and won't work on a plain HTML page.
|
|
|
|
|
how to place an asp panel control on an html page ?
|
|
|
|
|
satyaanand.andra@gmail.com wrote: how to place an asp panel control on an html page ?
Stop listening to morons. As I said, it's not possible.
|
|
|
|
|
*sigh* welcome to hell. You get downvoted for telling the truth, and instead people listen to folks more clueless than them, who answer in the hope of getting a CP MVP for their resume, despite having absolutely no idea. Half the people on this forum have no idea what ASP.NET is, or what it does.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
How to load an assembly using wrapper class and unload it?
|
|
|
|
|
What have you tried doing?
"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 creating a dll at run time. When i need to refer that dll i have to laod the assembly and get the reference. Till here its working fine but now if i recompile this assembly to modify it message comes that this assembly can't be loaded as it is in progress.So before recompiling i have to unload that assembly.
|
|
|
|
|
You can't unload assemblies. You can unload application domain which hosts these assemblies. So all the assemblies will get unloaded. BTW, what this has to do with ASP.NET ?
|
|
|
|
|
I have to dynamically load and unload assemblies in .net website so that the assembly can be modified at runtime and recompiled.Assemblies can not be unloaded but how using appdomain i can unload an assembly.I am compiling my assembly at one page and using it by loading the assemble in different page.
|
|
|
|
|
in the Page_Unload Event,
make the object to null
it will be nullified and no problem will be in future compiling
|
|
|
|