|
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
|
|
|
|
|
This is the object of the class i am making.This object is used to get the methods of the assembly using reflection.Can u pls tell me which object i will make null?
Dim asm As [Assembly] = [Assembly].LoadFile(System.Web.HttpRuntime.AppDomainAppPath & "Bin\Mytext.dll")
Dim objAssembly As System.Reflection.Assembly = asm
Dim objTheClass As Object = objAssembly.CreateInstance("DynamicClass")
|
|
|
|
|
objAssembly
Make it null in the page unload event
|
|
|
|
|
Hello All,
I am using ASP.NET 2005(C#). I want to show and save the excel file on server. For this I opened excel file in iframe and kept a save button outside the iframe. On Page Load I have the following code:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
string fileName = AppDomain.CurrentDomain.BaseDirectory + "SaveExcelFile\\Excel1.xls";
Microsoft.Office.Interop.Excel.Application ObjExcel = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook ObjWB;
Microsoft.Office.Interop.Excel.Worksheet ObjWS;
Object missing = System.Reflection.Missing.Value;
if (ObjExcel == null)
{
throw (new Exception("Unable to Start Microsoft Excel"));
}
else
{
ObjExcel.Visible = true;
ObjExcel.DisplayAlerts = false;
ObjWB = ObjExcel.Workbooks._Open(fileName, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing);
ObjWS = (Microsoft.Office.Interop.Excel.Worksheet)ObjWB.ActiveSheet;
Session["ExcelObject"] = ObjExcel;
Session["WorkBook"] = ObjWB;
Session["WorkSheet"] = ObjWS;
htxtFileName.Value = "SaveExcelFile/Excel1.xls";
}
}
catch (Exception ex)
{
Response.Write("Page Load Error : " + ex.Message);
}
}
}
and On Save Button Click event I have the following code:
protected void btnSaveFileToServer_Click(object sender, EventArgs e)
{
try
{
if (Session["ExcelObject"] != null && Session["WorkBook"] != null && Session["WorkSheet"] != null)
{
Microsoft.Office.Interop.Excel.Application ObjExcel = (Microsoft.Office.Interop.Excel.Application)Session["ExcelObject"];
Microsoft.Office.Interop.Excel.Workbook ObjWB = (Microsoft.Office.Interop.Excel.Workbook)Session["WorkBook"];
Microsoft.Office.Interop.Excel.Worksheet ObjWS = (Microsoft.Office.Interop.Excel.Worksheet)Session["WorkSheet"];
ObjExcel.ThisWorkbook.Save();
}
}
catch (Exception ex)
{
Response.Write("ERROR : " + ex.Message);
}
}
The above code works fine on my machine but when I deploy it on server it gives error "ERROR : Exception from HRESULT: 0x800A03EC" while saving the file back to server.
Please help me.
Thanks in advance.
|
|
|
|