|
Hello!
The control is a object that is located in the page class.
that is,
you can access methods in the control by referencing them as:
Mycontrol.MyMethod() from the page.
to find buttons and/or other control in the ascx, use Mycontrol.FindControl("MyButton").
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn. What you don't know. We teach
|
|
|
|
|
Hi Andreas, thanks for the response... I actually tried something similar to this earlier...but it won't find the control when I pass in the ID of, for instance the button FindControl("MyButton").
I was reading somewher that delagates could be used to pass information around in for instance a situation like this. Can someone shed some light on this please.
Tina
|
|
|
|
|
Hi,
Use the following control to get the control rather than FindContol
public static Control GetControlByID(string id, Control ctl)
{
Control retCotl;
for (int i = 0; i < ctl.Controls.Count; i++)
{
retCotl = ctl.Controls[i].FindControl(id);
if (retCotl != null)
{
return retCotl;
}
else
{
retCotl = GetControlByID(id, ctl.Controls[i]);
if (retCotl != null)
{
return retCotl;
}
}
}
return null;
}
Some how i feel Control.FindControl is buggy and doesnot always get the control. Use this one to avoid the problem
|
|
|
|
|
Hi,
If you just need to clear textboxes and put focus on then , you can use javascript to accomplish the task i dont know why you want to clear textbox in a server side event.
If you have to call server side code use reflection to invoke method and properties of the controls.
|
|
|
|
|
hi there, thanks a lot for your response...I'm going to give it a try tomorrow. Thanks
Tina
|
|
|
|
|
php or asp.net give me good reaseon i need to know which is best for web development
|
|
|
|
|
There's no easy answer to that - it depends on your individual needs. If you want continuity with the .NET framework, or you code well in a language such as C# and would rather do that than learn another language, then ASP.NET is the way to go. However, Windows-based servers (for ASP.NET) are usually more expensive than Linux ones (for PHP) so it depends whether you want to spend more money for an ASP.NET server or not.
This article might help.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
i think it depends on what kind of websites u r going to develop.
one reason to chose php, it's opensource u don't need to purchase license for it
|
|
|
|
|
Hi,
You may find this question quite absurd but I wonder how a project would be rebuild if a user performs some unexpected actions such as deleting the all files under bin and debug directory including dll files.
If I delete everything under bin directory and debug directory. How could I rebuild the whole project and lets say that I also deleted these files in recyclebin too. If I attempt to build or rebuild the project, I would get plenty of error messages and therefore none of essential files would be reproduced.
Rebuilding a project presumable be able to produce these essential files to create the structure of the project regardless of if there are errors or not in the project. Isn't that right?
Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
It totally depends on the project
Many times i have deleted all the files from bin folder to make sure all dll will get refreshed and it works for me.
If you are referring any dll to ypur project and that dll was in bin folder then you will get n number of errors
Check your references of the application. All refered dll should not be in bin folder create a different folder.
Is it that you wanted ?
Let me know if you have any concerns ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Thank you for your respond. Here is what I did so far so good.
I removed webconfig file from the project and then reproduced it. I saw that all the errors in all the web pages' gone. The errors was pointing the first line in every page.
However I faced to another problem. The class files in back-end that are associated to pages were still pointing the errors. The reason was because when you crate a new aspx page, VS also creating class files for the page in back-end. However when the root information for the inheritance for the pages get messed up, all this class files are also getting messed up too. I couldn't file any solution for that how to fix it. Basically I decided to create a new project and then transfered all the contents of the pages. Now it is working but the way shouldn't be the solution to how to fix such error.
Thanks again.
Regards.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Strange never seen such issue
I think you have upgraded your dot net application
May be 1.1 to 2.0 not sure
Might me in old web.Config there must some Page level definations that were present
Can you tell me what error you got ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
I got "Server Error in '/' Application. can not load type admin" error message. I have uset Netframework 3.5 also Netframework 2.0 is still exists.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
var n=''
str=document.getElementById("attach").value
m=str.lastIndexOf("\\")
for(i=m+1;i<str.length;i++)>
{
n = n + str[i];
}
alert
document.getElementById("name").innerHTML = n;
alert(document.getElementById("name").innerHTML);
this code is work in firefox while not work in ie given undefine. why?
anybody can tell me what the reason.
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
Why don't you use the Javascript substr function rather than incrementally adding the characters to the variable?
It takes the form:
string.substr(start, n);
where start is the starting character of the substring and n is the number of characters to return after this.
Change your code to:
var n="";
str=document.getElementById("attach").value;
m=str.lastIndexOf("\\");
m++;
n = str.substr(m, str.length-m);
document.getElementById("name").innerHTML = n;
alert(document.getElementById("name").innerHTML);
Tried in FF, Opera and IE and works in all.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
ya i know it very well that its work and i am also using split function of javascript to do this work and its working very well but i would like to know that (like you read in my question) that why this code is not work in ie while in w3schools.com says which i use function is work in both browser but why this one is not work. please tell me this what't the problem in my code. thanks for reply.
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
The reason it doesn't work in IE is because it doesnt like you doing:
string[i]
to return a character; try something like:
var s = "hello";
alert(s[0]);
and try it in IE and FF and note that it returns undefined in IE. The JavaScript standards are slightly different in IE and Mozilla-based browsers so this is why.
If you wanted to return a character, the safe option would be:
var character = string.substr(i, 1);
where i is the character you want to return from string.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
...
Blog link to be reinstated at a later date.
|
|
|
|
|
Server Error in '/WebSite2' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /WebSite2/fckeditor/editor/fckeditor.html
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
i found this problem.
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
Dear,
This is very common problem with fck editor.
it takes few seconds to load and meanwhile if you request for another page(by clicking another link) this problem will occur.
so, let it take time for few seconds then this problem will not happen.
Regards,
Dilip Patel
Ahmedabad
|
|
|
|
|
Thanks for Reply
i didnot understand what u say?
i run page from 10miniutes but still there is problem as i mention that error found noting else happen and after that i use refresh but not happen anything. my code is:
<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>]]>
<![CDATA[
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<fckeditorv2:fckeditor id="FCKeditor1" runat="server" basepath="~/fckeditor/" xmlns:fckeditorv2="#unknown">
</fckeditorv2:fckeditor>
</div>
</form>
</body>
</html>
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
You have downloaded the FCKeditor.NET package, and you need to download FCKeditor package too. Then add folder fckeditor into your project
|
|
|
|
|
Hi
I am having a ajax auto complete extender in my aspx page attached to a textbox, when the user type something in the text box it is showing options but it is taking half of a second
What i want to achieve is that when user starts typing at the same time it should show the options
because of that half second it seems to be slow
Please if anyone knows how to do this then please do let me know
Thanks and Regards
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Hi!
The auto extender has options for how often the search in the webservice should be made. try changing those.
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn. What you don't know. We teach
|
|
|
|
|
hi all,
in my project i want to show the hierarchical structure of employees. these values are coming from different tables. how can i draw the structure in a web form? please help me...
|
|
|
|