|
Hi
if you got soluttion then please post it
In Past i also stucked with similar problem where i had to set cookies using the Browser object.i didn't find the solution Still
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Add a template column and inside that add a label.
On Databind event add the tooltip for label
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
Hi,
This is prasanna.I did one project in asp.net 2.0 and i want deploy this project.so in order to deploy the project i need .dll file for my project.
anyone can help me to get the solution.
thanking you,
Prasanna
Prasanna
|
|
|
|
|
You will find the project dll in the BIN folder under your Application folder. By default you can find this in
c:\Inetpub\wwwroot\[Your Application Name]\BIN
With Regards,
M Srinivasa Rao
Tester is there to Find BUG.
Developer to Eliminate BUG.
Both are important for BUG free Software.
|
|
|
|
|
Hi friends,
I am working in asp.net 2.0. in my page i am having 35-40 textboxes. I want to validate for all the textboxes ie., if the textbox is empty is should give proper message. i want to validate it through javascript. Please give me suggestion. Expecting help.
Thank in Advance,
Regards,
Prya
|
|
|
|
|
ASP.NET has validator controls built in, you can define a validation group, a validator for each text field, and messages to show by the textboxes, and in a group in one part of the page. There's a RequiredFieldValidator, a RegularExpressionValidator, and even a CustomValidator, which can be used to run any javascript you like.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks a lot for your reply.
But, if i use required field validator then, have to use 35-40 that much of validators. sometimes if there is a textbox for more than 100 then also v have to use more than 100 of required field validator.
so is there any possiblity in javascript, for validating all the textboxes should not be empty.
Prya
|
|
|
|
|
You can write a custom validator that iterates over all the textboxes, I suppose. But, in the end, given the code that's needed to get a reference to a textbox, it would still be quicker to put the actual validation into a single function, which means you're again better off using the built in stuff.
You may be able to recursively iterate over the document looking for textboxes and check if they are empty, but I don't believe it's worthwhile.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi
write function in javascript
and on form load event
add attribute onblur to this function
or else
on button click u can call js function
in which u will check whether any textbox is empty
|
|
|
|
|
Hi,
Thanks. you told that add function in javascript. but we have to specify the name of the textbox in that function know. Then we have to write for every textbox? Can you please explain me.
Thanks and Regards,
Prya
|
|
|
|
|
hello
Write as in Page_Load()
<br />
<br />
txt1.Attributes.Add("onblur","javascript:checkValid(this);");<br />
txt2.Attributes.Add("onblur","javascript:checkValid(this);");<br />
....(write for all textboxes)<br />
txt40.Attributes.Add("onblur","javascript:checkValid(this);");<br />
<br />
In javascript
<br />
<br />
function checkValid(txtSamp)<br />
{<br />
if(txtSamp.value =="")<br />
alert('Please enter value');<br />
}<br />
<br />
Here the function you are calling for all the textboxes is the same,but the arguement differs...'this' keyword refers to the textbox object for which you are calling the function(no need for the name in this function).
Hope this helps you
~VSree
|
|
|
|
|
User.acmx(Usercontrol page)
validation for user and pwd it will username but it does not check pwd so give the correct code
string strScript1 = " function CodeBehindButtonJs() {";
strScript1 += "if (document.forms[0]." + uCtrlId + "_txtname.text==null){alert('Validation:Please enter a name');return false;}";
strScript1 += "else if (document.forms[0]." + uCtrlId + "_txtpwd.text==null){alert('Validation:Please enter a Password');return false;}return true;}";
strScript1 += "<";
strScript1 += "/";
strScript1 += "script>";
string strScript2 = "<script language=JavaScript> function CodeBehindDDlJs(me) {";
strScript2 += "document.forms[0]." + uCtrlId + "_btnSubmit.focus();";
//strScript2 += "alert('You selected '+ this.value)}";
strScript2 += "<";
strScript2 += "/";
strScript2 += "script>";
if ((!(Page.IsStartupScriptRegistered("Startup1"))))
{
Page.RegisterStartupScript("Startup1", strScript1);
}
if ((!(Page.IsStartupScriptRegistered("Startup2"))))
{
Page.RegisterStartupScript("Startup2", strScript2);
}
//ddlItem.Attributes.Add("onchange", "return CodeBehindDDlJs(this);");
Login.Attributes.Add("onClick", "return CodeBehindButtonJs();");
|
|
|
|
|
If you have textboxes in your form, you should use the built in validators to validate them. Your code behind should also never rely on the JS code, because it can be bypassed.
If you do write a validation function, it should return false if you want to stop the submit from happening.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I need to validate a textbox, using javascript and an alert box. If the user clicks the submit button, and a value for a textbox is not filled in, I want to alert the user, and stop the submit process... if the value is filled in, the user can proceed with the submit process.
How can I do this, and where can I read more about this type of validation.
|
|
|
|
|
You should use the "OnClientClick" property of the Submit button. Just use it to specify a javascript function. A requiredfield validator is also a good choice althoug it's not designed to show alert boxes.
Mihai,
|
|
|
|
|
Use required field validator and validation summary.
In order to show a popup message when validation failed. Use the code below or use the property window.
eg.
<br />
ValidationSummary1.DisplayMode = ValidationSummaryDisplayMode.BulletList;<br />
ValidationSummary1.ShowMessageBox = false;
Regards,
Mark
|
|
|
|
|
I would also prefer validation summary but if you want to show alert ,this is how u can
In the form tag call a javascript function onSubmit.
in script tag (in head) write the foll code
function Validate()
{
var txt=document.getElementById("TextBox1").text;
if(txt=="")
{
alert("Feild should not be empty");
return false;
}
else
return true;
}
-- modified at 16:32 Tuesday 27th February, 2007
|
|
|
|
|
try
onClick="return confirm('Ready to submit');"
or in ASP.Net
onClientClick="return confirm('Ready to submit');"
the return value influences the submit process: false stopps the submit
if that works write a java script function (ex. Check), wich checks the textbox for empty and returns false if so and tie it to the onClientClick-event
onClientClick="return check();"
|
|
|
|
|
hi
help me and tell me how to use postback url in .net2005?plz give an example
|
|
|
|
|
First I must ask do you really want to Post your page to a different page. There are good reason to do this, but in most cases it probably makes more sense to just have the button postback to your code behind for the page you are on.
If you do have a good reason to post to a different page, all you have to do is set the postbackurl on the control that you are using. In the page load of the other page you can check for PreviousPage. If that is not Null (Nothing in VB) then you have postbackurl from one page to a different page.
Hope that helps.
Ben
|
|
|
|
|
suppose i have 2 usercontrol called usercontrol1 and usercontrol2.
i want to call a method of usercontrol2 from usercontrol1.is it possible ??
if yes then pls tell me how could i do this with sample code in detail.
tbhattacharjee
|
|
|
|
|
I think a usercontrol should be working totally independent (as per OOAD principles). However if you still want to do that you can raise event from usercontrol1 that gets handled in ASPx Page which will call the method from usercontrol2. I hope this helps.
Shirish.
|
|
|
|
|
Hi
Sometimes while adding javascript code or any code in the codebehind,the event handler written in InitializeComponent() method vanishes off.
I have experienced it many times in my application.
What can be the reason for this and how can we avoid this?
Thanks
~VSree
|
|
|
|
|
I also faced these kinda problems. May be this is the bug of VS.
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
Is there any way to avoid this problem at least to a certain extent?
Because, it creates severe effects to the application, making the application an idle one!
|
|
|
|