|
Hi Student
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:
<br />
document.getElementById("aspnetForm").elements["<%= xmsRichEditor1.UniqueID %>"].value = tinyMCE.get('<%= xmsRichEditor1.ClientID %>').getContent();
If you want to see this page in its live environment you can see it here: http://blabberjax.com/singlePage.aspx?id=3[^]
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.
modified on Monday, November 9, 2009 7:45 PM
|
|
|
|
|
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.
Good luck.
|
|
|
|
|
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.
-----------------------------------------------------------
<asp:TemplateColumn HeaderText="Comment2">
<HeaderStyle Width="300pt"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" ForeColor="#CC0000" VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<asp:TextBox id=Textbox1 runat="server" Width="450px" Text='<%# DataBinder.Eval(Container, "DataItem.Comment") %>' BackColor="Transparent" BorderStyle="None" TextMode="MultiLine">
</asp:TextBox>
</ItemTemplate>
-----------------------------------------------------------------------
This is from the "with datagrid1" at page load
With DataGrid1
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).Height.Point(cc)
.Items(1).Cells(3).Wrap = True
End With
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)
Help is greatly appreciated.
Thanks
Rick
|
|
|
|
|
Hi all,
I am using ASP.NET & SQL Server 2005. Whenever there are changes in database, I need to send an email automatically to administrator.
I am very please if you can tell me how I can "send an email automatically to administrator" when programming with C#?
Thank you very much!
|
|
|
|
|
Isn't this question be posted in database forum?
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
You can implement it two ways-
- SQL Server2005 itself provide notification service (Do some research)
OR
- Write a windows service priodically ping to database and send email
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
I haven't understood so much about notification service. However, to notify the change of database I have used Service Broker of SQL Server 2005 & SqlDependency of C#.
Could you tell me more detail about "a windows service priodically ping to database and send email"? Which library of C# I should include? And could I use web service alternatly?
|
|
|
|
|
Try to followup step-
1- In database, create an extra column that will address send mail status
2- Create a windows and create there interval time like (30 Sec/15 Sec)
3- In this interval hit the database and check flag value of send mail status clumn, If it is flase then send email with required information
Note: You can many samples on codeproject itself or go with google.
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
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.
Best wishes,
Navaneeth
|
|
|
|
|
I suggest you do this via a trigger. Look into sp_send_dbmail and let the database handle the emails.
|
|
|
|
|
Can any One help,
How to play the .vox file in browser.
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
Thanks,
bruze
|
|
|
|
|
bruze wrote: broswer asking the plugin MIME type (audio/voxware)
Does that not offer a suggestion?
|
|
|
|
|
The browser was showing(audio/voxware) plugin. I have manually searched for the plugin, but browser showed message (audio/voxware) plugin not found". So can u please provide this plugin details.
|
|
|
|
|
bruze wrote: So can u please provide this plugin details.
Sorry, but I have no knowledge of this plugin. Try searching Google for voxware.
|
|
|
|
|
|
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)
modified on Friday, November 13, 2009 5:56 AM
|
|
|
|
|
Hi I have a ASP.net application.
I want to force a signout, if the user tries to access the same application in the following scenarios
If Multiple tabs within a same browser
or
if multiple (same) browsers eg two applications of firefox.
or if
if multiple different (browsers) eg one firefox & one MS Explorer.
Any help / advice apreciated in advance.
G
|
|
|
|
|
You can check window.opener.location property. That should have a URL of the page which opened your page.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
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.
Cheers.
|
|
|
|
|
This is a different thing. I assume he meant you should not be able to do Right click -> Open in new tab on any of the link. If he does, then he should be signed out.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
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)
Might be he can disable right click ....
|
|
|
|
|
Respected,
if (File.Exists(pdfFilePath))
{
bookingAttachment = new Attachment(pdfFilePath);
AgentPDFDetails.Attachments.Add(bookingAttachment);
AttachedPDFFile(AgentPDFDetails, pdfFilePath);
bookingAttachment.Dispose();
}
Can we Attached multiple files.
Thanks.
|
|
|
|
|
lrsalunkhe wrote: Can we Attached multiple files.
Yes
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
RESPECTED ,
HOW THIS IS DONE PLEASE TELL ME ?
THANKS
|
|
|
|