|
anujose wrote: after 10 seconds i want to redirect that page to form1
For this, you can use window.setTimeout (...) js method...Check this to get idea on time out event
<< >>
|
|
|
|
|
On the standard asp.net calendar control how can I pick up the fact that the selected date has been clicked? I have created a user control that displays the calendar control within a panel when a button is clicked. When the selection is changed the panel is hidden. Works ace except that if the currently selected date is clicked I also want to disappear the panel. Clicking on the selected date doesn’t disappear the thing, and I can’t find another event to trap the click on the calendar. Can anyone help? Its driving me crazy. The user can close the calendar by clicking the button again, but I know my users and there will be much complaining about it not disappearing when they select the same day, and I would kinda agree with them too! thanks in advance
Cheers
Ian
|
|
|
|
|
Hi,
As part of a project, I need to create a custom ASP .NET control that outputs a few lines of HTML including Javascript on to the page. I searched the internet and followed a few tutorials such as this one:
http://blogs.msdn.com/coding4fun/archive/2007/05/05/2429765.aspx
I tried following the instructions and the code compiles OK, but when it loads in the browser I get an error. It states that the tag is an unknown server tag. This is despite the fact that the class's code file is in the App_Code folder and the namespace matches the one in the web.config file.
I also tried other tutorials that involved putting the control in a class library. I couldn't get that to work either. If I try to add a reference to the DLL, it does it on the local machine and not the server.
I'm using Visual Web Developer, although I also bought Visual Studio 2005 Standard recently. I am connecting to a remote web server using FTP.
Does anybody have any suggestions? Any help would really be appreciated.
Thanks,
James
|
|
|
|
|
Are you registering the custom tag on the top of ASPX page ?
|
|
|
|
|
Hi,
Yes, I have tried using the following within the relevant page:
<br />
<%@ Register TagPrefix="cust" Namespace="myControls" %><br />
I also tried modifying the Web.config file like so:
<br />
<pages><br />
<br />
<controls><br />
<br />
<add tagPrefix="cust" namespace="myControls"/><br />
<br />
</controls><br />
<br />
</pages><br />
myControls matches the namespace containing the control. The author of the article suggests that doing either of these should be enough. Intellisense correctly recognises the tag and the pages compile OK. But I get the error I mentioned in the first post. I suspect that the code compiled for the control is not being sent to the server for some reason.
|
|
|
|
|
Try this
<%@Register TagPrefix="YourTagPrefix" TagName="TagName" src="~/YourControl.ascx"%>
|
|
|
|
|
jkp2505 wrote: <%@ Register TagPrefix="cust" Namespace="myControls" %>
try with Assembly name and src (source file)
Also How you are adding it your aspx page ?
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... "
|
|
|
|
|
Hi,
Thank you for the replies. I am having trouble understanding the difference between a user control and a custom control. The article I mentioned is about custom controls, inheriting from the WebControl class. The user control is a different thing, and I'm not sure if it can do what I need. The control will need to output Javascript, but dynamically setting the contents of a script tag is difficult because ASP .NET seems to try to interpret the code as C# code, even with the type set to "text/javascript".
@Navaneeth:
It seems I can't use the src attribute because it doesn't seem to work for custom web controls, only user controls.
@Sandeep:
The control is in a CS file in the App_Code directory, so it's not within an assembly. According to the article this should be OK.
|
|
|
|
|
In my application, i need to generate a pdf which takes around 10 minutes. The pdf generation code i have written in a page which i have made as an asynchronous page. for this i have added a httphandler in the web.config file too. I have a global error catch httpmodule in my app. It traps the errors throughout the application. But the problem is the error module doesn't trap any error generated by asynchronous page. Is there anyway I can trap the errors generated by asynchronous page? I am badly need of this
Thanks in advance
wilson
|
|
|
|
|
willsgeorge wrote: which i have made as an asynchronous page.
Could you give much more clear picture that how u created this asynchronous page ?
|
|
|
|
|
I have a page viz. printform.aspx. This doesn't have any controls. It just has the code for generating the pdf. In the web.config file, i have added an httphandler for this page. So when I tried to load this page, it execute as an asynchronous page and the pdf generation will be a back ground process. This is the implementation.
|
|
|
|
|
Hi All,
Can any one pls tell me how to convert Asp.net pages into Dll (I Mean the Codes.)
My exact requirment is..
I have developed a site which is to be given to the customer..But I dont want the customer to c the code's and my logic...
I have heared abt Publish website option ..but vl tat one be usefull to me..DO v have anyother options ..plz let me at the earliest ..
Thanks in advance
Bino Varghese
|
|
|
|
|
hey its simple, open ur project in vs2005. right click the solution in solution explorer and select publish Web site option. then define the location and thts it. ur web site has been published n as a result u'll only have design view of the pages and no code or ur logic is shown.
hope it works for u.
Regards.
Atif
|
|
|
|
|
Thank u Atif..
have Published My site
|
|
|
|
|
Hi Friends,
I want to create online quiz in webapplication with output is generated in pie chart
can u help me??
regards
saravanan
|
|
|
|
|
Hi All,
I need to enter decimal value in a textbox but only one decimal.
For eg: 55.3 (Valid)
55.5.5 (Invalid)
It should not accept second decimal.
Also, I need to validate for dash(-) ie it should not accept minus sign.
I want to use javascript for this.
Please help...
Thanks in advance...
|
|
|
|
|
ASP.NET 2.0 wrote: I want to use javascript for this.
Get the text of textbox
and Iterate through it while doing that check (-) and digits after (.)
Accroding to that return bool or Show alert
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... "
|
|
|
|
|
Hi Varsha
Have look at this code i think you are looking for the same
<br />
function CheckText()<br />
{<br />
var returnValue=false;<br />
var text=document.getElementById("TextBox1").value;<br />
var temp=new Array();<br />
var temp1=new Array();<br />
<br />
for(var index=0;index<text.length;index++)<br />
{<br />
<br />
if(text.charAt(index)=='-')<br />
{<br />
alert("Text Containd Minus");<br />
returnValue=false;<br />
break;<br />
}<br />
<br />
}<br />
temp = text.split('.');<br />
<br />
if(temp!='undefined' && temp.length>2)<br />
{<br />
alert("Text Contains more than 1 decimal ");<br />
returnValue=false;<br />
}<br />
<br />
<br />
return returnValue;<br />
<br />
}<br />
You can check the dot in the loop itself but the complexity will increase
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... "
|
|
|
|
|
Hi Sandeep,
Thanks for the help this is what I was looking for.
Thanks again...
|
|
|
|
|
Hi
I want to change or pass the formula fields to crystal reports programatically. Can anyone help me through sample code?
Regards
Shahzad Aslam
Software Engineer
|
|
|
|
|
hi i am trying to make an gridview which lets user change the user infomation(from login provider table)
however whenever the update button is click this error appear:
Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run this query.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run this query.
any one know how to solve this?"
|
|
|
|
|
Hi,
This is the situation...Now i have 2 requiredfield validators for 2 texboxes, one save button and one cancel button. When i click save button the 2 validators must be raised. When i click the cancel only one validator for one textbox should be raised. Plz help me, how is this possible....
thanx,
yamini
|
|
|
|
|
For this u have to create 3 validators. Apply 2 validators for save button and 1 validator for cancel button.
Check the Validation Group property in Save button and its validators, Apply the same name for both.
Apply the different Validation Group name for cancel button.
Shahzad Aslam
Software Engineer
|
|
|
|
|
|
Validation group will solve your problem ...check out this ..
<asp:TextBox ID="TextBox1" Runat="server" ValidationGroup="First"></asp:TextBox>
<asp:TextBox ID="TextBox2" Runat="server" ValidationGroup="First"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" Runat="server" ValidationGroup="First"
ErrorMessage="TextBox1 should not be blank" ControlToValidate="TextBox1">
</asp:RequiredFieldValidator>
<asp:Button ID="Submit1" Runat="server" ValidationGroup="First" Text="Submit 1" />
<asp:TextBox ID="TextBox3" Runat="server" ValidationGroup="Second"></asp:TextBox>
<asp:TextBox ID="TextBox4" Runat="server" ValidationGroup="Second"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" Runat="server" ErrorMessage=" TextBox3 should not be blank"
ControlToValidate="TextBox3" ValidationGroup="Second">
</asp:RequiredFieldValidator>
<asp:Button ID="Submit2" Runat="server" ValidationGroup="Second" Text="Submit 2" />
|
|
|
|