Tag Archives: C#

How to: Create MS Word Documents with OpenXML in C# or ASP.Net

Let’s begin with the tool that we need. OpenXML Productivity Tool & OpenXML SDK (Download)   OpenXML is a tool for create MS documents programmatically. And the best part is, OpenXML is an InteropFREE solution! You can work without any physical location for your files. It’s a life saver when you build web applications. With OpenXML, you can create all the documents in memory. And you can let the end user to download it. So, you don’t have to use physical temporary locations as a storage.   Here is Continue reading →

How to add “ClientSide Click Event” to “ASPxHyperLink” dynamically (as ASPxGridView Data Item Template Control)

As I described above, we can use “OnInit” methots to define dynamic behaviours for any control. You can just check this article for further information. And the back-end code; protected void dxHyperLink_Init(object sender, EventArgs e) { ASPxHyperLink link = sender as ASPxHyperLink; string param = Request.QueryString["param"]; if (!string.IsNullOrEmpty(param)) { GridViewDataItemTemplateContainer container = link.NamingContainer as GridViewDataItemTemplateContainer; WebDescriptorRowBase webDataRow = null; // WebDescriptorRowBase: Super class of WebDataRow and WebCachedDataRow if (container.DataItem.GetType().Equals(typeof(WebDataRow))) { webDataRow = container.DataItem as WebDataRow; } else if (container.DataItem.GetType().Equals(typeof(WebCachedDataRow))) { webDataRow = container.DataItem as WebCachedDataRow; Continue reading →