I am creating one of my first Asp.Net tools and I ran in to a small bump.
Currently I am doing a postback on a buttonclick which does some server-side calculations. The server-side code then uses those calculations to alter the contents of a div. In IE and Firefox when a postback happens, the div updates as expected.
However, in chrome all postbacks do a complete refresh of the entire page. What is causing this and is there a way around this behavior?
Update: ClientSide I have the following..
<asp:Button ID="Button2" Style="float: right" runat="server"
OnClick="S_ButtonClick" Text="Calculate" />
Which calls a method summarized as so.
protected void S_ButtonClick(object sender, EventArgs e)
{
//Code parsing values from textboxes ect.
//Do Some Calculations
//Output Results
outputDiv.InnerHtml = "<h2>Foo</h2><br/>";
outputDiv.InnerHtml += "Bar: " + calcValue;
}
It is possible that when this postback(if I understand this correctly) happens, that it is still fully reloading in firefox and ie, but it doesn't show it. This effectively masks the postback. However, when I test in chrome, any postback completely blanks the page before reloading the state. Hopefully this clears up exactly what I am asking. Also, my C#/.Net usage might be slightly flawed and I am willing to take comments on such.