|
Hi
Am using a control of type as 'button' in my web page.
How to make it invisible during page load?
I couldnt find any attribute to make its visibility to 'False'.
Please help me
-- modified at 1:12 Friday 19th January, 2007
|
|
|
|
|
Use any of the CSS styles display:none or visibility:hidden, depending on how you want to hide it.
---
Year happy = new Year(2007);
|
|
|
|
|
Mark the control with runat="server" and you can set the Visible property of the control in code.
|
|
|
|
|
Hi
I got the solution by including the code
document.getElementById("button1").style.visibility = "hidden"
Thanx!
|
|
|
|
|
Hi,
I would like to make recursive function to find the all control in a user control.
I would like to elaborate through example. Let us assume I make a user control and user control contains one web wizard control. Wizard Control contains on data view control and data view contains edit, update and delete button. Now I would like to get all controls ID and Name which are placed on User Control.
Example
foreach (Control ctl in Controls)
{
Response.Write(ctl.ID + " ");
if (ctl.Controls.Count > 0)
{
foreach (Control c in ctl.Controls)
{
Response.Write(c.ID + " ");
if (c.Controls.Count > 0)
{
foreach (Control ct in c.Controls)
{
Response.Write(ct.ID + " ");
if (ct.Controls.Count > 0)
{
foreach (Control cl in ct.Controls)
{
Response.Write(cl.ID + " ");
}
}
}
}
}
}
}
How to write a recursive function fot the above code.
Any help is appricted
Regards,
Rajesh
rajesh
|
|
|
|
|
IMHO, posting the recursive method here does not help you much, here are 2 steps that you can take to master on the issue:
+ Pick up a basic programming book or a tutorial on the web that can teach you on the concept of a recursive method and how to write it, clickety[^]
+ Once you understand recursion, you can go back to your case and try to write it, and now you can post your code if it does not work as you expect.
Last modified: 22mins after originally posted --
|
|
|
|
|
void FindControls(Control parent)
{
foreach (Control ctl in parent.Controls)
{
Response.Write(ctl.ID + " ");
FindControls(ctl);
}
Pretty basic recursion, really.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thanks for reply Christian Graus.
My problem has been solved by dint of your reply.
Regds
rajesh
|
|
|
|
|
Hi All,
I have to disable right of the Browser.I got the script on net and use that but when I include it in .js file my application doesnot work it shows login screen where right click is disable but when I click login but it doesnt go inside the main page.
Can anyone tell me what is the problem in the script.
Following is the script:
var message="Function Disabled!";
function clickIE4()
{
if (event.button==2)
{
alert(message);
return false;
}
}
function clickNS4(e)
{
if (document.layers||document.getElementById&&!document.all)
{
if (e.which==2||e.which==3)
{
alert(message);
return false;
}
}
}
if (document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById)
{
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("return false")
Thanks in advance.
|
|
|
|
|
Hi,
I have a chart in Crystal Report & i want to set a Background Image (jpg,gif) exactly behind the chart.I have set the Chart to Transparent Background in the Chart Expert and placed an image on the chart and moved it backward.In Design time / Main Report preview i can see the background image behind the chart but in the browser (on viewing) the background image behind the chart is not visible.
I'm using Crystal Reports for Visual Studio 2005
Does anyone have a solution to this problem.
|
|
|
|
|
i too faced the same problem.. export that report then u will find those in that exported pdf's
i think its a bug of crystal reports..
u can achieve it in one more way also
insert one more section .. place the image in the first section and in section expert check underlay following sections.. place the chart in the next section.. make sure both the sections are same height..
but this also will not help u.. since i have already tried..
VMSSanthosh
|
|
|
|
|
If anybody knows a workaround for this issue ,pls help me.Its really urgent.
|
|
|
|
|
Hello,
We urgently need help on performance issue in Crystal Reports. We are able to view the report using Crystal Report IDE. But the same report is timing out when tried to display it using Crystal Report viewer from a ASP.Net application (back end language used C#). The crystal report is getting populated based on a stored procedure and is mapped in the report (pull model).
We are using Crystal Report Version XI. The report is taking around 5 minutes in the Crystal Report IDE, and corresponding stored procedure is taking around 1.5 minutes for retrieving 300+ records. For the same scenario, the report is getting timed out from the application.
The report takes dates (start and end date) as input parameters and for a lesser precision (for 1 year the report is getting generated). The report has formulas for calculating the sub-totals and a grand totals of some amount field value.
The backend table has more than 1 million records and it will not be possible to archive some data as it is a requirement. The data in table will grow periodically.
Please let us know if you have faced any similar issue any time. Also, any suggestions in designing the report which can display the data running in lakhs of records.
Thanks in advance.
Regards
Vamsi Mohan Harish
|
|
|
|
|
u have to set the timeout property of ur connection info for ur connection info object
like this...
Dim attrib As DbConnectionAttributes
attrib = connInfo.Attributes
attrib.Collection.Add(New NameValuePair2("Connection Timeout", "50"))
VMSSanthosh
|
|
|
|
|
when i try to start default website showing this error
******unexpected error 0x8ffe2740 occured******
i check in google all are telling port conflict but how to
rectify this problem.
Many Thanks
please clarify doubt
|
|
|
|
|
Right click the Default Website in IIS and click Properties.
Set TCP Port to some other value (Default is 80) in the Website Tab.
|
|
|
|
|
hi friends
how to create search option in asp.net (eg;google).
any code please send me
thanx
regards
saravanan
|
|
|
|
|
Try this[^].
Jon Sagara
I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So i had to leave the place as soon as possible.
--Mr.Prakash
Blog | Site | Articles
|
|
|
|
|
Hello all:
We have an application that is written in Classic ASP which requires users to login (same as forms authentication in .NET). We need to add some more pages to this application which will be written in ASP.NET 2.0
When a user logs in, he/she uses the classic ASP interface to use their user IDs and passwords which verifies them.
Any ideas as to how I can take care of the authentication and still be able to use ASP.NET 2.0 classes to verify that the user has been authenticated?
Will I need extend any of these classes?
Any help will be appreciated. Thanks.
Robert
|
|
|
|
|
I wrote a service that used the sessionId ( from memory ) to copy the session variables between ASP and ASP.NET. That worked well.
Your core issue is, anything you can't pass on the URL, your two projects won't be able to share, by default. I believe I passed the ID to ASP.NET on the URL, which it used to get session variables from the service. Obviously, the asp app had to stuff them in as well.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
My Asp.net 2.0 pages need the client browser to have JavaScript enabled, and this must be detected immediately after the Page load so if the browser does not support the javascript I will redirect the user to some other page, but I don't know how to do that.
In addition, the Request.Browser.JavaScript and Request.Browser.JScript do not work when the browser supports the JavaScript but the user has disabled it!
Please help me detect if the user's browser is JavaScript enabled or not.
Sojaner!
|
|
|
|
|
Use Javascript in the onload event of the page to redirect to one page, and a meta tag to redirect to another page.
---
Year happy = new Year(2007);
|
|
|
|
|
What kind of meta tag?
And also I want the user to stay at the current page if his browser is javascript enabled and redirect him if his browser is javascript disabled.
Sojaner!
|
|
|
|
|
Sojaner wrote: What kind of meta tag?
http-equiv="refresh"
Sojaner wrote: And also I want the user to stay at the current page if his browser is javascript enabled and redirect him if his browser is javascript disabled.
It might be possible, but there is no obvious way to do it. The problem with that is that it's impossible to detect if Javascript is disabled, you can only detect if it's enabled. If it's disabled, there is nothing that you can use to do the detecting.
-- modified at 2:52 Friday 19th January, 2007
---
Year happy = new Year(2007);
|
|
|
|
|
But I know a website that is written in CGI and immediately after you enter the main page, it detects that you javascript is disabled and redirects you to some html page that tells you to enabled the javascript!
I don't care about the difference between detecting that the javascript is disabled or it is enabled! I just want to make the user, enable the javascript, when he enters my page!
For example, I use Firefox 2.0, and I have installed an add-on name "No Script" that blocks the javascript scripts until you allow them to run, but when I'm debugging my code, using Firefox, my code could not detect that the javascript scripts are blocked! Although the tags work correctly when this add-on block the scripts, but the Request.Browser.Javascript is true!
Sojaner!
|
|
|
|