|
haleemasher wrote:
void MySub(object sender, EventArgs e)
{
int a =Convert .ToInt32 (TextBox3.Text.Trim ()) + Convert .ToInt32 (TextBox4.Text.Trim ());
TextBox2.Text = (a.ToString ());
}
</script</blockquote>
Do it using java script.
<div class="ForumSig"><font face="Verdana" size="1" color="#000080">Abhijit Jana | <strong>Codeproject MVP</strong>
<font face="Verdana" size="1" color="#000080"><b>Web Site : <a href="http://abhijitjana.net">abhijitjana.net</a> </b></font>
<b><font face="Verdana" size="1" color="#0000FF"><small>Don't forget to click "Good Answer" on the post(s) that helped you</small>.
<a href="http://www.codeproject.com/KB/aspnet/IISRemoteDebugging.aspx"> View My Latest Article</a>
</font></b></font></div>
|
|
|
|
|
|
if u give values in textbox2 and textbox3 the sum of two values has to be displayed in textbox 4 right
the set the autopostback property of textbox3 to true and write the code in textbox3_textchanged event then it will work
|
|
|
|
|
thank u very much its now working. i forget to true autopostback
thnx again
|
|
|
|
|
of course, using js would be a ton better.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: of course, using js would be a ton better.
Not if he wants his teacher to give him a good grade
|
|
|
|
|
How to block the webpage visitors to save the current webpage?
|
|
|
|
|
|
I guarentee you, almost everyone who worries about this, isn't creating anyone that anyone would steal anyhow.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: almost everyone who worries about this, isn't creating anyone that anyone would steal anyhow.
WOW! that was poetic.
|
|
|
|
|
|
Hi,
i need source code on how to check whether a new picture has upload in the folder.
the source code have to be in VB.
Thanks
|
|
|
|
|
File.Exists[^] can tell you whether a file exists in the specified directory.
|
|
|
|
|
once the picture in the folder then it will send a sms.
Now i need code on the file directory.
|
|
|
|
|
pearllyn wrote: Now i need code on the file directory.
u mean??
|
|
|
|
|
Are you going through your spec one step at a time and asking us to write your code for you ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I am using an objectdatasource with gridview. I have enabled paging for my datasource and gridview. It works great but there is one problem. On same page, i also have brands dropdownlistbox so one can chose between different kinds of laptops. The first item is "All". All selects quite a number of rows and there can be upto 20 pages. For dell laptops, i have only 2 models in table. What happens is that if a person navigates to page 10 in All devices and then changes the dropdown to Dell, there are no records in the grid. I have debugged and it happens because startrowindex is not 0. I am using mysql and have used limit. If a person is on page 1, one can see the 2 dell models.
How would i be able to solve this problem?. Sorry if its a stupid question, Is there anyway in which i can change the startrowindex to 0 in DropDownlistbox change index event?
Thankyou in advance.
|
|
|
|
|
When binding the grid view after changing drop down list, try setting the PageIndex property of GridView to 0.
|
|
|
|
|
|
Please, I want to know how to create warning yes/no message boxes using C# and ASP.NET. For example, Are you sure you want to delete this?
|
|
|
|
|
Use the JavaScript method; confirm
if(confirm('Are you sure you want to delete this?'))<br />
do something
only two letters away from being an asset
|
|
|
|
|
Thanks Mark.
But please, explain to me how to use the confirm method. When I used it an error is displayed on compilation "The name confirm dosen't exist in the current context"?? Do I have to provide code for this method before calling it?
|
|
|
|
|
You use it as I've given within a JavaScript block on your page, nothing more. Perhaps you could show a sample that is giving you problems, or search this site or others for examples.
only two letters away from being an asset
|
|
|
|
|
Hi Mark,
The problem is that I'm using C# to write my code. On confirming the delete message, my program should delete all information related to a student. So I create a new SQLDataSource and then write the delete command as follows.
SQLDataSource DeleteStudentInfo = new SQLDataSource();
DeleteStudentInfo.DeleteCommand = "Delete From Student Where StudentID = @StudentID";
Then I identify my delete parameters.
How to insert javascript code before my C# code shown above?
Thanks Mark
|
|
|
|
|
Kontakentee wrote: How to insert javascript code before my C# code
You don't. JavaScript is run on the client, C# code is run on the server. I think you should reread a couple chapters in the book or ask the professor or TA for help, your missing some concepts.
only two letters away from being an asset
|
|
|
|