.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

posting a comment

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
hi guys,in my asp.net website i have no memebrship or sql (authentication mode=none)  however on some pages i need to allowvisitor to leave a comment.i have the following form:post a comment , name textbox, comment textbox, and a button called post...what event handler i shld create for the buttom, and how do i dissplayer the comments above each other with a date of each comm?

View Complete Post

More Related Resource Links

Problems posting to a package


Hey Y'all

I'm currently creating a program that accesses a mysql package to add data to a few tables.  I'm currently getting an error that says  "

ORA-01403: no data found
ORA-06512: at "JESSE.PKG_WORKPLAN", line 42
ORA-06512: at "JESSE.PKG_WORKPLAN", line 177
ORA-06512: at line 1


These lines are


and 177:add_team_members(V_PROJECT_ID, V_START_DATE, v_FISC_YEAR, V_MEMBERS ,V_NUM_MEMBERS,'add');

Checking these variables in my asp.net page they are all receiving parameters.

Is there a  way to see what the database is actually receiving from the asp.net page?

Or is there another thing to be looking at?


Posting data to ASMX and return Object for jQuery


I am using fluent NHibernate with WebForms and I am trying to build a page where I allow a user to post a status update on their profile page and I a using a .asmx WebService to post the data to the database and then returnig a StatusUpdate instance to the page to be used by jQuery. I have a couple problems.

1) First off when I return a string from the WebService(i was testing) the textbox where the user enters their status doesnt empty the contents. And since the page doesnt refresh even if I manally clear out the textbox and put in something else, it still posts the previous status to the database again. How do I fix this?

2) Secondly, when I return the StatusUpdate Object from the Webservice I cant the results to display anything. Like I sad, Im using jQuery to make an AJX call to the WebService.

Here is my code:

User Profile Page:

Status: <asp:Label ID="status" runat="server"></asp:Label><span style="font-size:.7em;"><asp:Label ID="statustime" runat="server"></asp:Label></span><br />
<textarea id="statusBox" rows="3" cols="40"></textarea><br />
<input type="button" value="Update Status" onclick="SetStatus(); return false;

How to Customize the Add Comment 'Items on this list require content approval...' notification in


WSS 3.0:

If content approval is turned on, the Add Comment section displays a fairly ugly notification. Is there any way I can customize that section through e.g. CSS or SPDesigner?

I'd like to change at least the text, and preferably the yellow exclamation image, and also the background if possible.

Posting back a disabled button


Folks, I have a control which inherits from LinkButton and I'm trying to make sure that the user cannot cause mayhem by performing multiple postbacks.  That seemed an easy enough challenge, so I have this code [snippet] on the client:

ButtonClicked: function () {
    if (this._DisableOnClick == true) {
        this.get_element().disabled = 1;
        this.get_element().style.cursor = 'wait';
    else {
        alert('Posting back');

The alert is of course only there for debugging.  If the DisableOnClick value is false, then I see the "Posting Back" alert and, when I click ok, the postback occurs - all good.

If the DisableOnClick value is true, then the "button" gets disabled and the cursor turns into an hourglass - again good.  But the postback doesn't happen - not good.  I assume that the ASP client code is trying to help by preventing the postback when it sees that the link is disabled.

So, how can I either:

  • Persuade the LinkButton to postback even though it has just been disabled; or
  • [probably better] Get my client code to execute immediately after the postback code rather than before.



jQuery modified ListBox not posting back modified values


Hi everyone,

I have an ASP.Net ListBox that I'm trying to populate via jQuery, using the following snippet:

        $("#MyList_btnAddAll").click(function(e) {
        $('#MyList_lstAll option').appendTo('#MyList_lstSelected');

The code has two ListBoxes in fact, one a "source" and the other a "destination".  As you can tell above the ListBoxes are MyList_lstAll and MyList_lstSelected.  These are rendered in the browser as <select> elements, as you'd expect.

The jQuery is working great, the items are moving from one ListBox to the other, the DOM is updated but when I submit this form (not using jQuery), the ListBoxes don't reflect this change on postback. 

I realize my modifications via jQuery aren't available in ViewState but I thought since the DOM was updated these changes would be part of the postback data?  But in the codebehind after postback the ListBox contents haven't changed.  Does anyone know what might be going on and what I can do about it?  Many thanks.

Populate Treeview upon entered criteria and page action without complete page posting on client side


1. I have a treeview on left side in a panel in my aspx page and I have a Text box and a Search button on the right panel. On entering a search criteria and clicking the Search button, I want to get the data needed for the treeview (FYI - I have a webservice call for that) and then populate the treeview completely but keep it collapsed to the root node.

  Each time I enter the search criteria and click the Search button, I don't want to post the entire page (and also don't like the page flicker), how can I achieve this? I know that in order to avoid complete postback upon Search button click, I can do so by client callback and get the data needed for the treeview, but in this case, I have to build the treeview nodes as table - row/cells and handle all the events and handlers myself, which I want to avoid (also means that I won't be able to take advantage of the inherent expand and collapse capabilities of the Treeview). On the other hand, if I use the OnTreeNodePopulate event handling of the Treeview control, using the C# script code on the aspx markup, it doesn't recognize the entered criteria in the Text box. So either way,

Posting data to a website (HTTPS) from a Desktop Application in Visual Basic (.Net 3.5 or .Net 4.0)

Hello everyone, I'm trying to create a desktop application that will update my IPv4 address to an IPv6 Tunnel broker.  I have the app running up to the point where it sends the data to the website, and then I get exceptions.  I'd like someone to take a look at my code, and tell me what I've got wrong (if anything).  Here's the code that I have (the only portion that is filled in is for Hurricane Electric) Dim strUsername As String = txtUsername.Text.ToString 'User Id supplied by the User. Dim strPassword As String = txtPassword.Text.ToString 'Password supplied by the User. Dim strPasswordHash As String = "" ' this will be created from the hashing of the password supplied by the user. Dim strTunnelID As String = txtGlobalTunnelId.Text.ToString 'Global Tunnel ID (He.net and ) Dim strUrl As String = "" ' Place holder for the URL Which will be provided after the password is hashed and specified by the tunnel broker. Dim strTunnelBroker As String = cbxTunnelBroker.SelectedItem 'Sets the Tunnel Broker to the user specified one. Dim wc As New WebClient() 'Allows for posting data to the server 'holds the server response. Dim strData As String = "" 'Provides the data for the form. Dim result As String = "" Select Case strTunnelBroker Case

Solved: LDAP authentication: error code 49 - 80090308, comment: AcceptSecurityContext error, data 52

Hi, I have a problem conneting to another domain (far.away.domain). We have a two-way trust to this domain. Also I can access the DS using ADSI edit and our Administrator account (ourdomain.com). I tried several types of credentials (userid = "CN=Administrator,CN=Users,DC=ourdomain,DC=com", "Administrator @ ourdomain.com" (without blanks)...). Connecting to ourdomain.com is no problem, but to far.away.domain I can't connect, I always get the error 525 (user not found). What could be the problem? Have I to use an entry from the ForeignSecurityPrincipals CN of the far.away.domain? I also tried to connect using Softerra LDAPBrowser and a command line ldapsearch without succes and with not a better error message. But why is it not possible to use a trusted account, or is this a active directory feature and does not work with pure LDAP bindings? Best regards, Nils.

POSTing to a remote site and HTTP 302 redirection

hello everyone, Objective: POST data to a remote website and follow the 302 redirect response Synopsis: This works quite well in plain ASP.NET. I can POST to the remote site either using the asp form's action attribute or a button and it's PostBackUrl property. However as soon as I try to accomplish the same behavior inside a Sharepoint page it causes a lot of trouble. Scenario 1 (changing the form's action attribute - less preferred): Imagine this simple publishing aspx page (for what it's worth I encountered the exact same behavior using an application page). <input type="text" name="myField1" value="abc" /> <input type="text" name="myField2" value="abcdef" /> <input type="text" name="myField3" value="123" /> <input type="submit" value="submit now" /> Note that I need to use pure html controls because the remote site expects pre-defined names for these fields. And as we all know control naming is something we cannot really influence up to .NET framework 3.5SP1 (4.0 is supposed to help, right?). Anyway we still need to set the action attribute of the form. This is being done in the page's OnLoad() method. Result: The aspform is being posted to the remote site, the remote site responds with 302 and the browser redirects to the returned ur

internet explorer closes. I can't get my e-mail to open a comment from facebook

when I try to open my internet explorer it either won't open at all or it workd for awhile then it crashes. I was able to open my yahoo mail and open facebook comments from the yahoo e-mail but it never connects 

Error when posting to forums from off server

On a new server just installed Sharepoint 2010. Users can access it, but regardless what permissions I give them (or even if I create a new discussion board) anytime they attempt to reply or create a new discussion they get the following error:   Keep in mind I can create discussions from the server without issue but I (with owner properties) have the same issue when accessing the page while not on the server.   " Error List does not exist. The page you selected contains a list that does not exist.  It may have been deleted by another user.   Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 2de4f9b4-0f00-4e42-97b3-a529f665d6a6 Date and Time: 8/31/2010 1:01:33 PM"

Posting data from ASP to WebService

Hello. How can I post 2 parameters from classic ASP to WebService? I have classic ASP that contain few strings (could be 1 or 3). I need to send them to C# Web Service.   Any help will be great. Thanks.Amir

SharePoint Designer Workflow Changes not Posting

Hey Community, I've encountered a tough problem.  I have made some changes to a SharePoint Designer (SPD) workflow.  I click Finish in the workflow designer and the changes are saved without error.  However, when I run the workflow on the actual site, it's still the old workflow design, not the workflow with the recent changes.  On this site I have Full Control permissions.  No errors appear in the workflow.  I do not have access to the CA, SP Logs, or Event Viewer. I hope you can help!Tom Molskow SharePoint Architect - If I solved the issue please propose my reply as the answer - Thanks!

Relative hyperlink changes when posting dokument in SharePoint

I am trying to post a web site (word document) with relative links to other sites in Sharepoint. What happens is that the link changes to a lockal link on my computer. F.eks.   http://sharpoint_server/stem/Pages/topptekst.aspx This is the link I want to use an it changes to:   file:///C:\User\usern_name\documents\sharpoint_drafts\topptekst.aspx   How can I keep the hyperlink to where I want it?   Reili

Posting form data and receiving a response

Hey everyone,I have an application that needs to post data to a url on the web and then receive an xml response.  I have an HTML form (provided by vendor) that posts the data correctly, however when clicking the submit button the page is redirected to the post url and the xml is displayed in the browser.  I need to do this on a postback within an existing asp.net project.  Basically, the user will fill out the form, the form data will post to the url, the xml response will be received, and the appropriate values will be displayed on the screen. I've found a bunch of examples for doing this but I just can't seem to get my head around it.  Can anyone point me in the right direction or explain how I should go about this?  Thanks for your help!Will

Tips on Posting Good Questions

Here are a few suggestions that make it sure you get the best answer to your question as quickly as possible: Search for your question on the forums or in Visual Studio's help system first -- it's likely someone may have already answered your question, and you won't have to waste time waiting for it to be answered again Post in the correct forum (see below) -- since the experts in various subject matters tend to stick to the set of forums that focus on those topics, a question about the C# yield keyword posted in the Common Language Runtime forum will likely take a lot longer to be answered than the same question in the C# Language forum. Make sure your title summarizes the specific problem you have --  since we try to answer the maximum number of questions we can with our time, we often skim through question subjects to quickly find the ones that we know the answers to.  A question with a title of "Urgent! Help needed!" is not as likely to get answered as a question with a title of "How do I use the BinaryFormatter with IIS".  A more specific, detailed title is far more likely to get a response than a general one.  Give details about your problem --  rather than "When I call Process.Start I get an exception, please help", provide the exception type, message, and call stack.  If possible pro

Posting using Server Side and not Client side form?

Hey, i want to post to a page by using server side and not client side form and submit button.Now im using this code:Response.Redirect(Request.Url + "&t="+Title+"&d="+Description+"&a="+Author+"&p="+Published+"&i="+Thumbnail);so it redirecting to the same URL with parameters.. (it works)But it makes alot of bugs and the address bar is long as hell..How can i post to the same page using Server side code (C#) and send the same parameters?Thanks.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend