Probably not the case but I see that your UpdatePanel is set to ConditionalUpdate referring to btnSubmit's onclick event. OnClick is set to "btnSubmit_Click" however your update logic is within "button_click"!
Also, if above is not true, what exactly is Save() function doing which is being called onClientClick?
Thank you for the fast reply, alas I just 'shortcuted' the text to make it more readable, yes the button_Click method is actually btnSubmit_Click. I was just trying to follow the guidelines and make the code as small as possible.
The update panel is set to conditional, and at the very end of the event handler you will notice I called updateComments.Update();.
I am using tinyMCE inside the update panel (<uc1:xmsRichEditor ID="xmsRichEditor1" runat="server" UseFullEditor="false" />) and in order to reset the textbox with the value inside tinyMCE I need to do the following before posting back to the server:
document.getElementById("aspnetForm").elements["<%= xmsRichEditor1.UniqueID %>"].value = tinyMCE.get('<%= xmsRichEditor1.ClientID %>').getContent(); //this code works perfectly fine, has been for a while<br />
The thing is that If I add one comment, the AJAX postback works, and the new comment is added in a new div inside of divComments (divComments.Controls.Add(divComment);). But after posting one comment, if I try to post another one the Response I receive from the server (using firebug to inspect it) has the new divComment in the response html, but the html is never actually injected into the DOM.
To make sure that there was not some unhandled exception, I debugged the code. It works identically both times, and the Response from the server is identical each time (except the second time it includes a new div with the second comment) though the html in the update is not refreshed on the second postback.
Yeah I didn't think that was the case but I just wanted to make sure. Sometimes small things like that can cause major issues
Also, I looked at your website ... nice design. Unfortunately I wasn't able to get much in terms of, behavior or test data, from the comment page as I wasn't able to add a comment at all. It seemed like it worked at first but then I kept getting a 404 error.
I have never worked with tinMCE .... but if time allows I'll try to download tinyMCE and see if I can get it to work in a relatively simpler example similar to yours. Sorry wish I could be of more help.
Yup thats exactly the problem I'm having. The first time I submit a comment, it will add it to the page, after that, each sequential postback will send the correct response, but the html inside the update panel doesn't update...
Hi. I have a datagrid templatecolumn itemtemplate that I wish to set the rows according to the output row count from sql db. Rows count.
I have this on the html side which is generic.
<ItemStyle HorizontalAlign="Left" ForeColor="#CC0000" VerticalAlign="Top"></ItemStyle>
<asp:TextBox id=Textbox1 runat="server" Width="450px" Text='<%# DataBinder.Eval(Container, "DataItem.Comment") %>' BackColor="Transparent" BorderStyle="None" TextMode="MultiLine">
This is from the "with datagrid1" at page load
Dim cc as Integer
cc = DsgccV11.GCComents.Rows.Count()' Row count from sql
.AllowPaging = True
.PagerStyle.Mode = PagerMode.NextPrev
.PageSize = 25
.Items(1).Cells(3).Wrap = True
I gather the row count as shown in line (cc = DsgccV11.GCComents.Rows.Count()) This works fine. What I need to do is use the output cc number to set the "rows" for the (asp:TextBox id=Textbox1) property within the (TemplateColumn.ItemTemplate)
Choosing the right method depends on how fast you need the email to be send after the update. If you need immediate email notification, as suggested Windows services will be the choice. If you can afford a short delay, efficient approach would be to create a console application and schedule it using windows scheduler.
I can able to play .wav file in browser, but its not able to play the .vox file, because broswer asking the plugin MIME type (audio/voxware)
My requirement is .vox file should play in the browser when we click the Play button event using C# with Asp.Net 2.0
I created a application with Two layers
DAL and BLL ,and I registered them in GAC for global access by assigning strong keys for the dlls
I have created two versions like version 1 should return 10 as output and version 2 as 20
For my website I am adding the dlls from GAC so it will not place in bin it should directly assign to web.config as Microsoft dlls( System.Web.Extensions)
I am getting the outputs clearly for version 1 and version 2 as 10 and 20 as i expected. but Once I published the code with version 1 dll it is getting output as 10,
if I change to version 2 in web.config that time also it is showing the output as 10,y it is not showing as 20 even though I change to version 2(version 2 indirectly refers to version 2 dlls in gac as per before publish)
Whenever some user logs in to a system, it actually creates a new session.
Just store the Session id againist IP address in the database whenever the user logs in.
Now create one handler from which check every request. Use IRequiresSessionState to get the session id. If the session is found in the database for the same IP, Server.Transfer to Logout page with a particular error.
This way no more than 1 login would be allowed from the same IP.
Remember : You should delete the entries as soon as the user logs out. Also you need to place a trigger which would automatically delete one record when Session expires in the server for the IP, so that if one user forgets to logout, he could login again after a certain Timeout range.
That cant be done. Bcos in case of Firefox Session will be the same if you open a new tab. That is why if you login on an account using firefox, it will automatically transfered(which is of course not the case with IE)