Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
Dear Frnds !!
 
I made a registration form in asp.net c#, its running fine.
 
But one thing i need to do is, after submitting the form i gave a message(JAVASCRIPT) and it will be pop up and i wrote a message Records Successfully submitted.
 
and i need a message after submitting....as, Records Successfully submitted and ur id is 1001 something like that.
 
I need to access with this id,
 
SO I HAVE A ANOTHER WEBFORM To ACCESS WITH THIS ID.
In this Webform I have 5 Textboxes.
 
Suppose if i use that id, in this form.....if i enter 1001 in first textbox it should display all the related 1001 in other textboxes.
 
SO TELL ME HOW TO DISPLAY A MESSAGE, AFTER SUBMITTING THE REGISTRATION FORM.
I want a message after submit button (Like this your Id is 1002 something like that)
 
Thanks, Please help me this problem
Posted 20-May-12 20:36pm
Comments
MaulikDusara at 21-May-12 2:10am
   
Please show SQL code or procedure to insert record in to database and also C# code execution on submit button click.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

YOu can use client script manager i.e.
 
 
ClientScript.RegisterStartupScript(GetType(), ClientID, "alert('Successfully submitted and ur id is " + id + " ');", true);
 

 
this should be last line after submitting your code
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi Rajnith,
 
For your first page you can opt for:
 
1. A stored procedure which would return you the last submitted ID's value and you show that in your message.
 
2. Fetch the last inserted record and select the "id" where timestamp is latest(if you've any column for timestamp in your table).
 
I'd suggest to use first option because it's time efficient.
 
For your second page, you can fetch all the records in a object data source and bind your textboxes to it's fields keeping "id" as key field.
 
Hope this helps you !
 
Happy Coding Smile | :)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 515
1 Maciej Los 349
2 Richard MacCutchan 220
3 BillWoodruff 209
4 Mathew Soji 160
0 OriginalGriff 8,654
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,229
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 21 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100