jQuery and Asp.Net Gridview

26. May 2009

So you have a fancy jQuery table sorter that you want to use but just realized, or thought you knew, that the Gridview control does not render the thead tags.  Guess what ,it does!  You just have to add this tidbit of code in your codebehind before the prerender event and viola!

 

GridView1.HeaderRow.TableSection = TableRowSection.TableHeader

 

This will render the thead and you are all ready to go with that new little jQuery toy you just downloaded.

.Net, Visual Studio, Tips and Tricks, jQuery

BlogEngine.Net and Facebook

17. April 2009

I just wanted to let everyone know that I just finished some work on BlogEngine to run as a Facebook application.  I have a couple of polishes to put on it and I will post it. 

Let me know if you are interested in the source code.

Thanks,

Roman

BlogEngine.Net, .Net, Visual Studio, Tips and Tricks

XmlDatasource caches automattically.

9. April 2009

If you run into the issue of using a data control such as a gridview with an xmldatasource….

 

Make sure that you set the EnableCaching property equal to false.

http://forums.asp.net/t/1262408.aspx

Microsoft, Visual Studio, Tips and Tricks

Some tidbits of VS2008 goodness.

8. April 2009

I got a funny feeling I am going to need this again.

30. March 2009

I am working on a field in a SQL2005 database that stores custom attributes in an xml data type column.  I am pretty sure that I am going to  need this link in the near future.

http://msdn.microsoft.com/en-us/library/ms345117.aspx

.Net, Tips and Tricks, Visual Studio

HttpHandler and Session State

6. March 2009

Its funny when you use a specific solution to solve many problems over and over and then you find out the limitation of your “genius” solution.  Kind of a let down huh?  What if you soon discover that your solution still is “genius” and solves the problem you thought you had.  that is a good feeling if I say so myself. 

I just started to "heavily using HttpHandlers that are dependant on the session state.  The site that I have been working on requires Session so there was no way around it.  The issue that kept coming up is that the context.Session that was getting passed to the ProcessRequest method was always null.  I needed the Session and the link I am including gave me the answer. 

To save you the read, you can use to Interface markers to tell IIS that you need the Session passed to your handler, IRequiresSessionState or IReadOnlySessionState.  Guess what, you know have the current Session being passed to your handler.   Hope it helps.

 

http://bytes.com/groups/net-asp/341797-session-object-null-http-handler

.Net, Visual Studio, Tips and Tricks, Microsoft , , , , ,

Get the Request.Forms value of a control

26. November 2008

Just a little FYI.  I have a dropdown control in a data grid on a web page.  I was trying to get the updated value but it was not being returned properly.  So, I found the Request.From[“control name”] by using the server control property called UniqueId.  UniqueId maps to the posted name of the server control Id.

system.web.ui.control.uniqueid

.Net, Visual Studio, Tips and Tricks

My first WebSlice

13. March 2008
I added this to my BlogEngine them. It worked the first time. Now that is amazing. I expect that this will take off for many BE.N site.
<div class="hslice" id="1"> 
<h1 class="postheader" >
<a class="postheader taggedlink" href="<%=Post.RelativeLink %>">
<div class="entry-title"><%=GetColoredTitle(Post.Title)%></div></a>
</h1>
<div class="date"><%=Post.DateCreated.ToString("MMMM d, yyyy HH:mm")%> by 
<a href="<%=VirtualPathUtility.ToAbsolute("~/") + "author/" + Post.Author %>.aspx"><%=Post.Author %></a>
</div>
    <!--<div class="entry">-->
        <%-- <%=Body %> This has been depreciated so please don't use it anymore. --%>
        <%-- Instead use the line below --%>
        <div class="entry-content" ><asp:PlaceHolder ID="BodyContent" runat="server" /></div>
        <br /><%=Rating %>
    <!--</div>-->
</div>

.Net, BlogEngine.Net, Microsoft, Visual Studio

BlogEngine.Net Documentation

19. February 2008

I wanted to let everyone know that I have generated a web html help version of BlogEngine.Net.  It is for the current release only.  I will be updating it as Mads releases each version. 

BlogEngine.Net HTML documentation

BlogEngine.Net, Visual Studio , ,

HTML Editor Providers - Introduction and concept

3. August 2007

I am publishing a first draft of my idea on using an HTML Editor provider of the BlogEngine.Net. 

Essentially, I added an html provider to the web application.  I got a little frustrated with tinyMCE.  So, I decided that I wanted an easy way to interchange html editors.  I prefer Telerik and FCKEditor over tinyMCE any day.  However, the motto for BlogEngine.Net is no third party assemblies.  I like that idea.  No supporting third party assemblies.  Period. 

I am still working on the provider for tinyMCE.  The issue that I am running into is the having the js files load and execute on the textbox that is being rendered.  It can be fixed but I haven't finished it yet. 

The code is pretty well organized and you should be able to review it with much confusion.  Here is what I did...

  1. I added a Control.Textbox class in the App_Code/Controls directory
  2. Removed the reference to the tinyMCE web user control page
    <%@ Register src="~/admin/tinyMCE.ascx" mce_src="~/admin/tinyMCE.ascx" TagPrefix="Blog" TagName="TextEditor" %>
  3. I left the <Blog:TextEditor runat="server" id="txtContent" TabIndex="4" /> extactlly the same.
  4. I added this to the App_Code
    image 
  5. I added this folder to support the two html editors that require external files
    image
  6. I added this to the <BlogEngine> Section
  7. <BlogEngine>
      <blogProvider defaultProvider="XmlBlogProvider">
        <providers>
          <add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider"/>
          <add name="MSSQLBlogProvider" type="BlogEngine.Core.Providers.MSSQLBlogProvider"/>
        </providers>
      </blogProvider>
      <htmleditorprovider defaultProvider="FCKEditorHTMLProvider">
        <providers>
          <add name="TextboxHTMLProvider" type="BlogEngine.Core.Providers.HTMLEditors.TextboxHTMLEditorProvider" height="200" width="500"/>
          <add name="FreeTextBoxHTMLProvider" type="BlogEngine.Core.Providers.HTMLEditors.FreeTextBoxHTMLProvider" height="200" width="500"/>
          <add name="FCKEditorHTMLProvider" type="BlogEngine.Core.Providers.HTMLEditors.FCKEditorHTMLProvider" height="300" width="800"/>
          <add name="tinyMCE" type="BlogEngine.Core.Providers.HTMLEditors.tinyMCEHTMLEditorProvider" height="300" width="800"/>
        </providers>
      </htmleditorprovider>
    </BlogEngine>
  8. Run the solution and it works.

Take a look and tell me what you think.  I know how I am voting.

BlogEngine.NET.zip (2.62 mb)

.Net, Reviews, Visual Studio, BlogEngine.Net , ,