By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,294 Members | 2,517 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,294 IT Pros & Developers. It's quick & easy.

how to work Submit Button on Content Page in ASPmet 2.0

P: 3
I am doing one project with asp net 2.0 and c# ,i have master page and content page ,
in content page i have 10 text box and one submit button , when submit
will click those text box need to validate .
i have written java script function in content page ,But when i click submit button it will execute server side code when java script function returns false .

i dont know how to do in ASPnet 2.0 please help any body .
============================================

i don't know some how i solved this problem
in page load of content page i have written

string aa = " if(document.getElementById('Text1').value==\"\") { alert('please'); return false; }";
Page.ClientScript.RegisterOnSubmitStatement(GetTyp e(), "done", aa);

it is working but i dont want to write every thing in code i want to write in .js file or in html function ....

please help me ,, i will be thankful to you .......

thank s
Dipesh
Jun 29 '07 #1
Share this Question
Share on Google+
2 Replies


100+
P: 107
I am doing one project with asp net 2.0 and c# ,i have master page and content page ,
in content page i have 10 text box and one submit button , when submit
will click those text box need to validate .
i have written java script function in content page ,But when i click submit button it will execute server side code when java script function returns false .

i dont know how to do in ASPnet 2.0 please help any body .
============================================

i don't know some how i solved this problem
in page load of content page i have written

string aa = " if(document.getElementById('Text1').value==\"\") { alert('please'); return false; }";
Page.ClientScript.RegisterOnSubmitStatement(GetTyp e(), "done", aa);

it is working but i dont want to write every thing in code i want to write in .js file or in html function ....

please help me ,, i will be thankful to you .......

thank s
Dipesh

Do the validation in aspx page within script tag and call it in pageload by adding the attribute in the click event of that button.
Jun 29 '07 #2

P: 3
Do the validation in aspx page within script tag and call it in pageload by adding the attribute in the click event of that button.

hi,

Can you explain more i didnt get

thanks
Jun 29 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.