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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

a problem by sending records

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :ASP.Net
 

hi

i have a form to get some informations from user

i use linq to data to insert the informations in database

every thing work but when i send informaton after that if i refresh the page with browser it send informations once more and, if i refresh the browser several time it will still send the informations.

can you please help me?  




View Complete Post


More Related Resource Links

How to stop unauthorized users from sending documents to a Records Center site?

  

I can't find a way to stop unauthorized users from sending documents to a Records Center site. Can someone please help me? Do i need to configure anything to restrict it to the members of the web submitters group?

I'm still using MOSS2007

Thanks!


The impossibility of doing things depends on your will to do it.

Problem updating records with LINQ, Concurrency?

  
 My project includes a grid view with some updtable fields, some fields throw an error on update and some do not and it does not really make sense. WORK_STATION_ID does not cause an error, ROOM _ID cause an error, both are int? (I am using c#) and for update I use the code liste below.using (DataClassesDataContext db = new DataClassesDataContext()) { var product = (from p in db.ASSETs where p.ASSET_ID == ASSET_ID select p).Single(); product.WORK_STATION_ID=WORK_STATION_ID; product.ROOM_ID=ROOM_ID; db.SubmitChanges(); }    Row not found or changed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.Linq.ChangeConflictException: Row not found or changed. Source Error: Line 93: Line 94: Line 95: db.SubmitChanges(); Line 96: Line 97: Source File: C:\Projects\TEST_II\trunk\ObjectDataSourceLibrary\AssetController.cs Line: 95 Stack Trace: [ChangeConflictException: Row not found or changed.] System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) +963417 Syst

problem in sms sending

  
I am using asp.net for sending sms through sms gate way and code like is like this public string readHtmlPage(string mobileNumber, string messageText, string sturl)        {            //String result = "";            //String strPost = "username=_sms&password=153&sender=msm-ig&cdmasender=mycdmasenderid&to=" + mobileNumber + "&message=" + messageText + "";            String result = "";            String strPost = "user=5&pwd=2sg&senderid=TM-D&mobileno=" + mobileNumber + "&msgtext=" + messageText + "";            StreamWriter myWriter = null;            HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(sturl);            //add Proxy info if required            //objRequest.Proxy = WebProxy.GetDefaultProxy();            //objRequest.

Sending an e-mail with the content of a GridView in asp.net 2.0. problem

  
Hi experts,  I am Sending an e-mail with the content of a GridView in asp.net 2.0. Everything is working fine , but my problem is that  it is also sending "DELETE" LINKLabel to the email. Is there anyway so that only Content of Gridview will go to email and "Delete" Link will not go. Is it possible ??? Thanks in Advance

Sending Array of Custom Class over WCF Problem

  
I have been attempting to convert some service calls that returned a DataSet into something more lightweight. For instance, I am converting: [OperationContract] public DataSet GetCommittees(); into: [OperationContract] public List<VolunteerCommittee> GetCommittees(); where committee is defined as: [DataContract] public class VolunteerCommittee { [DataMember] public int Id { get; set; } [DataMember] public String Name { get; set; } } I copied the structure of the data contract and the operation contract right from an example in a book I bought on WCF. The author mentioned that the List<VolunteerCommittee> would get converted into an array over the wire, so the client's operation contract looks like: [OperationContract] public VolunteerCommittee[] GetCommittees(); My problem: When the service is called, an empty array is returned every time. When I put trace statements in, I see an array of 48 VolunteerCommittees leaving the server. I've done some reading on the problem and tried a number of suggestions, such as using the XmlSerializer attribute, including a certain namespace as a [return:] on the server's contract, changing the type of binding (it's using wsHttpBinding... I tried basicHttpBinding) and turning off MTOM in the behavior, but none of these changed the empty result of the call. At this point, I'm hoping someone can shine some light on

problem with sending mail by smtpclient

  
 hi , I have an aspx  page that sending a mail by smtp client , but it`s not work properly ! and pass an exeption : failur sending mail here is my code :   protected void BTN_Submit_Order_Click(object sender, EventArgs e) { MailMessage MailMsg = new MailMessage("Sales@anahidcorp.com", "test0@anahidcorp.com"); MailMsg.Subject = "?????"; MailMsg.Body = "????"; MailMsg.IsBodyHtml = false; MailMsg.BodyEncoding = System.Text.Encoding.Unicode; MailMsg.SubjectEncoding = System.Text.Encoding.Unicode; MailMsg.CC.Add("test1@anahidcorp.com"); MailMsg.CC.Add("test2@anahidcorp.com"); NetworkCredential cred = new NetworkCredential("Sales@anahidcorp.com", "mypass"); SmtpClient smtp = new SmtpClient("myserver"); smtp.UseDefaultCredentials = false; smtp.EnableSsl = true; smtp.Credentials = cred; try { smtp.Send(MailMsg); } catch ( SmtpException ex) { Response.Redirect("errpage.aspx?err=" +

Problem with listing records from table (object not found)

  
Hi everyone, I'm creating a website based on ASP.NET MVC 2 and SQL Server 2008 R2 Express for the database. After creating the table in database, I want to list all records in that table. For that, I use "scaffold'ing in ASP.NET to automatically generate the view file. But I encountered an error when loading that page. The error message was: [CODE] Server Error in '/' Application. Invalid object name 'dbo.Accommodations'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'dbo.Accommodations'. Source Error: Line 41:         </tr> Line 42: Line 43:     <% foreach (var item in Model) { %> Line 44: Line 45:         <tr> Source File: d:\MyProject\Views\Accommodation\Index.aspx    Line: 43 Stack Trace: [SqlException (0x80131904): Invalid object name 'dbo.Accommodations'.]    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584 &n

Problem Facing While Inserting records into table which os dynamicaly created

  
Hi,I have created table into database dynamicaly,while inserting records into that dynamic table i faced problem.The name "STD000001" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted. this error occured.I created dynamic table by ,declare @STUDENT_Table varchar(50)set @STUDENT_Table = [dbo].[GetStudentTable](@SchoolID)declare @cmd varchar(5000)Set @cmd = 'Create Table  ' + @STUDENT_Table + '(   [student_id] [varchar](10)NOT NULL,    [school_id] [varchar](50)NULL,    [class1] [varchar](50)NULL,    [division1] [varchar](50)NULL,    [educalis_id] [varchar](16)NULL,    [roll_no] [varchar](10)NULL,    [first_name] [varchar](50)NULL,    [middle_name] [varchar](50)NULL,    [last_name] [varchar](50)NULL,    [gender] [varchar](6)NULL,    [father_name] [varchar](50)NULL,    [mother_name] [varchar](50)NULL,    [father_office_address] [varchar](200)NULL,    [mother_office_address] [varchar](200)NULL,    [home_address] [varchar](200)NULL,    [father_mobile_no] [varchar](10)NULL,    [mother_mobile_no] [varchar](10)NU

Problem sending an email to all users of a sharepoint group

  
Here is what we did so far: 1. created an OU in AD and delegated full control to Sp service account 2. Configured incoming email settings 3. on sp site created a new group with full control permission 4. created an email distribution group for this group with an email address 5. in CA approved the distribution group to be created in OU 6. In Ad we can check the OU is there with the specified email address 7. added users to the group, but when we send an email to the group email address it does not forward to the group members. Please advice  

Sending encrypted Querystring (with + Symbol) problem

  

I Sending a querystring value When it is encryped , I got the encypted value with +symbol

from vb.net code behind......



At that time The querystring contain link does not work properly....



How can i solve this issue..........????





problem with inserting records??

  

When i am inserting my data i am getting this error 

An explicit value for the identity column in table 'emp' can only be specified when a column list is used and IDENTITY_INSERT is ON.


i have set Identitty specification and is identity of the table as yes so i am getting this problem whenevr i set it to no i am not getting any error,can anyone explain me why i am getting this error??


Problem Sending Alert to External domains from SharePoint 2007

  
The alerts get to the users within company just fine however alerts to partner outside compnay (to external e-mail address) does not work. I have setup relay connector on exchange server 2007 but that did not help. Any help would be greatly appreciated. For testing purpose I have created a contact in MS-Exchange 2007 with an external e-mail address and contatc is viewable at SharePoint site but not getting alert e-mails from SharePoint

problem in selecting deslecting multiple records in grid view by clicking control key.plz help

  

i want to select/deselect multiple records inside grid view by clicking control key.I can do the selection but the deselection is not working properly..there is some thing wrong in the  logic.plz help me to solve the problem.

my java script function is like..

<script language="javascript" type="text/javascript">

    function FillColor(cellid, id, evt) {
    
        var isSelected = document.getElementById('<%=hidSelectedRow.ClientID%>');
        alert(cellid);
        if (!evt) var evt = window.event;
        ctrlPressed = evt.ctrlKey;
        if (!ctrlPressed) {
            //alert(ctrlPressed);
            var clearCellColor = document.getElementById('hidCellId').value.split(',');
            for (i = 0; i < clearCellColor.length; i++) {
                document.getElementById(clearCellColor[i]).bgCol

problem in selecting deslecting multiple records in grid view by clicking control key through java

  

i want to select/deselect multiple records inside grid view by clicking control key.I can do the selection but the deselection is not working properly..there is some thing wrong in the  logic.plz help me to solve the problem.

my java script function is like..

<script language="javascript" type="text/javascript">

    function FillColor(cellid, id, evt) {
    
        var isSelected = document.getElementById('<%=hidSelectedRow.ClientID%>');
        alert(cellid);
        if (!evt) var evt = window.event;
        ctrlPressed = evt.ctrlKey;
        if (!ctrlPressed) {
            //alert(ctrlPressed);
            var clearCellColor = document.getElementById('hidCellId').value.split(',');
            for (i = 0; i < clearCellColor.length; i++) {
                document.getElementById(clearCellColor[i]).bgC

sending email problem

  

hi everybody,
i have serious problem in my web site.
i had use some sort of code to send email in my website.the problem is that code works properly in one page and don't work on the other page.
i'm completely confused.
the code behind and web.config :


MailMessage mail = new MailMessage();
mail.From = new MailAddress("contacts@website.com");
mail.To.Add(DropDownList1.SelectedValue);
mail.Subject = txtSubject.Text;
mail.Body = "
something...
";
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("mailserver.com");
smtp.Credentials = new NetworkCredential("contacts@website.com","password");
smtp.Send(mail);




W E B . C O N F I G



<system.net>
<mailSettings>
<smtp>
<network defaultCredentials="false"/>
</smtp>
</mailSettings>
</system.net>



sending email problem

  

hi everybody,
i have serious problem in my web site.
i had use some sort of code to send email in my website.the problem is that code works properly in one page and don't work on the other page.
i'm completely confused.
the code behind and web.config :



MailMessage mail = new MailMessage();
mail.From = new MailAddress("contacts@website.com");
mail.To.Add(DropDownList1.SelectedValue);
mail.Subject = txtSubject.Text;
mail.Body = "
something...
";
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("mailserver.com");
smtp.Credentials = new NetworkCredential("contacts@website.com","password");
smtp.Send(mail);






W E B . C O N F I G

<system.net>
<mailSettings>
<smtp>
<network defaultCredentials="false"/>
</smtp>
</mailSettings>
</system.net>

SharePoint - Why does SP2010 create two extra versions when sending to an official file (records cen

  

Hi,

SharePoint 2010 creates 2 extra versions when sending a document to a record centre. The size of these versioned documents are always 6.2KB and does not have any check-in comments.

Please explain the purpose of these versions?

 

Thanks,

Hilmi J.


Categories: 
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