Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Comments
[no name] 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.

YOu can use client script manager i.e.

C#
ClientScript.RegisterStartupScript(GetType(), ClientID, "alert('Successfully submitted and ur id is " + id + " ');", true);


this should be last line after submitting your code
 
Share this answer
 
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 :)
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900