|
Make all event handlers call the same method, generate a string in this method and pass the string to the text property of textbox2
|
|
|
|
|
Thanks For Your Suggestion
Now it's ok.
Regards
Koti.K
|
|
|
|
|
Hi,
I am working with Visual Web Developer 2005(c#.net).
I want to pass more than 15 parameters to a function.
So,for clarity i wrote the function in multiple line using the operator "& _".
But,it doesn't work and i get an error message as 'The name '_' doesn't exist in the current context.
Can anybody help me in this?.
|
|
|
|
|
'& _' can be used only with VB.NET.
Use '+' to concatenate strings in C#
|
|
|
|
|
in vb.net there is no End of the line character ";" so if you want to break a single line into 2 you have to use "-". In C# we have ";", so we can split a line into 2.
Ex:
Response.Write
(
"Hi, Like this"
);
|
|
|
|
|
//you can use like this also
Response.Write("hi,"+path+"");
Padmanabhan
|
|
|
|
|
objIncidentBL.UpdateIncidentDetails(Convert.ToInt32(txtIncidentNo.ToString()),
txtApplicationName.ToString(),
txtIncidentType.ToString());
I have to pass 15 more parameters in this function.if i use '+' as below,i m getting an error message such as operator '+' cannot be applied to operand of type string.
objIncidentBL.UpdateIncidentDetails(Convert.ToInt32(txtIncidentNo.ToString()), +
txtApplicationName.ToString(), +
txtIncidentType.ToString());
Yazhini
|
|
|
|
|
LazhiniP is true.Remove "+" it will work fine.
|
|
|
|
|
No...if i remove '+' it gets compiled but i m throws a run-time error stating "input string is not in correct format".
Whether '+' operator doesn't work for parameter passing or in function definition?
Yazhini
|
|
|
|
|
if you think the problem is with "+"
Response.Write("First" + "Second"
+ "Third"
);
Try this
|
|
|
|
|
Hi all,
That was my First Article in Code Project. I have finished writing the content. Still my article showing PENDING. What to do next ?
Ramesh Sambari
Knowledge is like honey.
Collect it, to make life sweet.
|
|
|
|
|
there is one checkbox which indicated "Work in Progress - do not make public"
check whether u have selected that.
Padmanabhan
|
|
|
|
|
Hi,
That Check Box is not Checked. Should I check it now ?
Ramesh Sambari
Knowledge is like honey.
Collect it, to make life sweet.
|
|
|
|
|
no don't check it. Wait for few days. They will edit and publish it.
Padmanabhan
|
|
|
|
|
For clarifications on articles in CP, you should write to submit (at) codeproject.com.
Furthermore, this question befits to be posted on 'Site Suggestions and Bugs' forum since that is expected to be more frequently checked by Site Management Team than this one.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
i have used window.showModelessDialog to show my page but when i click on the button on that page new window gets opened why is it so
|
|
|
|
|
Add the following tag within the <html> tag to avoid opening a new window during postbacks in showModalDialog()
<head runat="server">
<base target=_self ></base>
</head>
|
|
|
|
|
Hi all,
I am using iTextSharp for exporting to PDF.I want to know how to apply page border to it.
Can any one tell me how to do??
Thanks in advance.
|
|
|
|
|
|
Hi Everyone,
Can anyone help me out in creating a sample Hello world application using Restful webservices.
Thanks in Advance.
Regards,
Manowj
modified on Monday, May 25, 2009 6:39 AM
|
|
|
|
|
|
Good Article. It works , Please tell me if iam wrong , we are not using .asmx file and WSDL . Instead of these two, we have referenced the C# class library.
Thanks in Advance
Regards,
Manowj
|
|
|
|
|
Hai all,
I have a multiline text box. I want to limit the charaters inside the textbox to 250. For that i written this code
in cs file i added the attributes like(txtEmpWithA is my textbox name)
this.txtEmpWithA.Attributes.Add("OnKeyPress", "txtreason_limit(event)");
and the function in aspx file
function txtreason_limit(evt)
{
if(document.form1.txtEmpWithA .value.length == 250)
{
evt.keyCode = 0;
return;
}
}
This is working fine when i am typing there ,but if i copy and paste,it taking more than 250 charactors
Please help
|
|
|
|
|
this can be handled by 2 ways
1) by writing the code for validating whether the text is greater than the length
if (TextBox1.Text.Length > 250)
{
Response.Write("The text is greater than 250");
}
(or)
2) disable copy and paste.
function DisableCopyPaste() //Prevents Copy, Paste, Select, ContextMenu in TextBox and MultiLine TextBox controls.
{
var myForm = document.forms[0];
for (var i = 0; i < myForm.elements.length; i++)
{
var elementType = myForm.elements[i].type;
if (elementType == 'text' || elementType == 'textarea')
{
document.getElementById(myForm.elements[i].id).onpaste = function(){return false;};
document.getElementById(myForm.elements[i].id).oncontextmenu = function(){return false;};
document.getElementById(myForm.elements[i].id).onselectstart = function(){return false;};
document.getElementById(myForm.elements[i].id).ondragstart = function(){return false;};
}
}
}
//paste this in page load
ClientScript.RegisterStartupScript(this.GetType(), "StartUpScript", @"DisableCopyPaste();");
Padmanabhan
|
|
|
|
|
It's a better way to use a custom validation control provided by the VS IDE.
Welcome to www.softwaretree.net!
This website is generated completely by static html pages transforming technology.
You can find many excellent audio/video tools there!
|
|
|
|