Wednesday, February 3, 2010

.Net Controls Not Posting Back

If you're .NET controls are not posting back there could be a couple of reasons. First make sure that if it's not a button that AutoPostBack is set to "True". Another error that I came across when none of my buttons would post back is that the html that was created from a GridView was invalid. Tow controls were named the same thing and thus when the html was rendered they were given the same name. Once I made sure that all controls had unique names, the button posted back perfectly.

Tuesday, November 10, 2009

Passing Cookies from one domain to another....

There is no easy way to pass cookies from one domain to another but here is a quick run down of how to do it.

On the page that you want to pass the cookie to post to the domain that you want to get the cookie from. In this post you need to read for a response. On the side that is passing to domain you need to create a page, that has a javascript function that looks up the value of that cookie. You CANNOT do this through server side code because it will give you the value of that cookie of the first domain. You also cannot create a web service to do this, because they are stateless and do not maintain cookies or sessions. I will post my code later, let me get this to work first.

-Jus

Saturday, October 31, 2009

Formatetc Errors

When you encounter a formatetc error, unload then reload the project. This should cure the solution, there are other solutions out there but most are kinda complicated!

Monday, October 26, 2009

Retrieving last Primary ID that has been added

It's actually fairly simple.

SCOPE_IDENTITY()

In a table adapter you can just make a function that retrieves this on the table that you created.

Another JP production