Posts
16
Comments
96
Trackbacks
18
February 2006 Entries
Success!

After struggling with Atlas for awhile, we finally released our latest feature on http://www.squeet.com. The new “Preview“ functionality uses the Atlas UpdatePanel to display the 5 latest entries for any blog you enter. It will by default show only a summary of the item, but you can click on the “expand“ link to show the full HTML content for the entry.

The UpdatePanel is surrounding a standard ASP.Net repeater control, which contains some LinkButtons. The UpdatePanel responds to the RowCommand event raised by the repeater, and all the code to handle the event is normal code-behind code. The Atlas portion of this portion was very easy to implement (once I got away from using the WebService calls directly, those don't seem to be fully mature yet).

preview

posted @ Wednesday, February 15, 2006 11:18 AM | Feedback (0)
Atlas, Viewstate, IE and FF.

In my inaugural post, I described a problem I had with a WebMethod erroring out instantly on the client, accompanied by a puzzling message in the Event Log, regarding viewstate.

On a whim, on that site, I decided to “publish” the website from within VS 2005 to a separate directory.  I set up another virtual directory within IIS to point to that directory, loaded up the site and IE, and all my WebMethod calls were working!

From IE6, that is.

From FireFox, none of the calls work on the published website....

...the first time. If I click on the link that calls the WebMethod again (after getting the instant error), it works fine. Very weird.

posted @ Monday, February 13, 2006 7:47 AM | Feedback (0)
Putting the hair back in.

In this post, I mentioned tearing my hear out because I couldn't get a gridview to work right with the update panel. Today I decided to just start on a fresh web form and everything seems to be working fine.

I did learn that an updatepanel without any triggers will consume any server-side event that fires inside of it (ie, to get paging and sorting working you don't need to explicitly specify triggers to handle those events). I also learned that (and this isn't related to Atlas) a gridview's page and sort events also fire off RowCommand events...which I guess make sense since the header is a “row” and the pager thing is also a “row”.

Still trying to figure out the updatePanel inside of a userControl thing figured out, I'll keep you posted.

posted @ Monday, February 13, 2006 7:07 AM | Feedback (0)
Tearing my hear out, bit by bit.

Ok, I'm about to have a nervous breakdown and need to post this, and then walk away for a bit.

I have a gridview on a page, that looks like this:

<asp:gridview id="gvTest" runat="server" allowpaging="true" allowsorting="true" autogeneratecolumns="false" pagesize="5" onpageindexchanging="gvTest_PageIndexChanging" onrowcommand="gvTest_RowCommand" onsorting="gvTest_Sorting" enablesortingandpagingcallbacks="false">
 <columns>
  <asp:boundfield datafield="Id" headertext="Id" sortexpression="Id" />
  <asp:boundfield datafield="Name" headertext="Name" sortexpression="Name" />
  <asp:templatefield headertext="Preview">
   <itemtemplate>
    <asp:linkbutton id="linkPreview" runat="server" commandname="Preview" commandargument='<%#(int)DataBinder.Eval(Container.DataItem, "Id") %>' text="Preview" />
   </itemtemplate>
  </asp:templatefield>
 </columns>
</asp:gridview>

I have an UpdatePanel that has triggers like this:

<triggers> 
 <atlas:controleventtrigger controlid="gvTest" eventname="RowCommand" />
</triggers>

Why then, when I sort or page the gridview, does the updatepanel swallow my postback, but when I click the linkbutton that says preview, do I get a postback?

posted @ Sunday, February 12, 2006 10:07 AM | Feedback (0)
Atlas - Jan CTP issues

I've been playing around with Atlas since the Jan CTP dropped a couple days ago. It's got some impressive functionality, as well as some (seemingly) glaring oversights. One of the things I'm trying to do is incorporate an UpdatePanel inside of a UserControl. I need the UpdatePanel to have a trigger that's on the containing page, but I can't get it to work. I've tried the following (on the containing page):

protected override void OnPreInit(EventArgs e)
{

ControlEventTrigger t = new ControlEventTrigger();
t.ControlID =
this.linkGetFeedPreview.ID;
t.EventName =
"Click";
previewControl.UpdatePanel.Triggers.Add(t);
base.OnPreInit(e);
}

I've also tried putting this code in OnInit, and have had no luck. I always get the error message The ControlID property of the trigger must reference a valid control. Has anyone else tried this and gotten it to work.


Another issue I've been having is that calls to a WebMethod in my page class aren't always executing. The javascript is: PageMethods.SomeMethodName(blah, onComplete, onTimeout, onError);.  Many times when I execute that javascript, the error method immediately executes, and in the event viewer on that machine I'll see the following:

Event code: 4009

Event message: Viewstate verification failed. Reason: Viewstate was invalid.

Google has proven useless thus far. Anyone have any thoughts?

posted @ Sunday, February 12, 2006 9:13 AM | Feedback (2)
News