|
*** Script ***
$(document).ready(function () {
$(".content_head").click(function () {
$(".content_body").hide(100);
$(this).next(".content_body").slideToggle("slow");
});
});
***Style***
.content_head
{
width: 150px;
background-color: #CCCCCC;
cursor: pointer;
}
.content_body
{
display: none;
width: 150px;
background-color: #E9D9BA;
}
***Panel**
<asp:panel id="Panel1" class="content_head" runat="server" width="130px"
="" backimageurl="~/Image/header-1.png">
Management
<asp:panel id="Panel2" class="content_body" runat="server" width="130px">
<asp:hyperlink id="HyperLink1" runat="server" navigateurl="~/PartStatus.aspx">Online Parts Status
<asp:hyperlink id="HyperLink7" runat="server"
="" navigateurl="~/Partcomplaintdetails.aspx">Part Complaint Details
|
|
|
|
|
thanks for solution but i am using :
<asp:Menu ID="MoveMenu" runat="server" StaticDisplayLevels="1" Orientation="Horizontal"
StaticEnableDefaultPopOutImage="false" renderingmode="List"
Width="100%" OnMenuItemClick="MoveMenu_Click">
<DynamicHoverStyle BackColor="#6597F0" ForeColor="White" Font-Bold="True" />
<DynamicMenuStyle Width="80px" BackColor="AliceBlue" />
<Items>
<asp:MenuItem ImageUrl='http://localhost:11755/ServerFiles/ApplicationFiles/Icons/Button/gmailMove.png'>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
Please Help !
|
|
|
|
|
I want autorun a function (ex: send mail every day,...) in my web ASP.NET but dont use Windows Service. Server Asp allway auto. Please help me!
Thank you read!
|
|
|
|
|
ngoanrazor wrote: I want autorun a function (ex: send mail every day,...) in my web ASP.NET but dont use Windows Service You can write a simple console application which send the mail. Schedule this application using Windows scheduler.
Best wishes,
Navaneeth
|
|
|
|
|
Thank you reply!
I dont want use Windows scheduler. Is it possible when use ASP to autorun?
|
|
|
|
|
Sir;
ASP.NET works under IIS which is a web server that recieve http requests and send http reponses but it can't run periodic tasks.
Help people,so poeple can help you.
|
|
|
|
|
ngoanrazor wrote: Is it possible when use ASP to autorun? You could hack it up. But it won't be stable and not recommended for a production system.
To do that, start a thread which loops on an infinite loop.
while(true)
{
Thread.Sleep(someTime);
} This will work but when IIS recycles the ASP.NET process, it will kill this thread. Like I said before, this is not stable.
Best wishes,
Navaneeth
|
|
|
|
|
thank you
|
|
|
|
|
Well there is a technique using cache object expiration where you can get
a function of your own to run, search on google for:
asp.net cache scheduled task
and you can find working code.
Good luck.
/jc
|
|
|
|
|
Thank you, I will try
|
|
|
|
|
Application_Error exists in Global.asax.
Most of the unhandled exception are caught here.
While testing, I changed the name of a stored procedure to something that doesn't exist in the database.
Now the control does not come to Application_Error.
When I debug the app, the debugger shows exception when ExecuteReader is called.
I do not have any try...catch
I believe all exceptions must be caught by Application_Error.
But it does not behave so.
|
|
|
|
|
Can you share few information?
1. What code is present in your Application_Error? If you remove everything in it and place debugger, does it hit the method?
2. IIS7? CustomError mode in Web.config?
3. Are other methods of Global.asax getting triggered, like Session_start?
4. Is there any other .config file in your application?
|
|
|
|
|
My Application_Error contains 3 lines - Server.GetLastError , Server.Transfer and Server.ClearError .
I tried removing all these lines and simply put a return statement on a breakpoint, but it did not hit.
My development environment is IIS 5.1, Windows XP, Visual Studio 2010.
I tried both with customError mode="Off" and customError mode="On" with the same results.
Session_Start is being called in Global.asax and I checked it by placing a breakpoint.
I only have a web.config file.
I created another sample file and tried it with the same results.
I have shared the sample for you if you have the time.
https://docs.google.com/file/d/0BwxeXZOAvlxJa3AxMUIxVkVUSEk/edit?usp=sharing[^]
You can download it by selecting File -> Download.
Since I'm not a web developer, my current solution is to place a try...catch and then redirect to the error page from the catch handler.
This works for me.
Any help would be appreciated.
Thanks for your time.
|
|
|
|
|
Hi Santosh,
I downloaded it and opened in my VS2010 as a website. Set the break points in Global.sax. Built and ran.
Guess what? It hit the Application_Error method.
Am I missing something or you are?
Please re-run the application that you shared with me with breakpoints and see again.
|
|
|
|
|
I'm definitely missing something.
It still gave me the same behavior.
So to make sure, I used Windows 8 and Visual Studio 2012.
I created a new application and it still gave me the same behavior.
It hit Session_Start , but did not hit Application_Error .
While debugging the error is shown in Default.aspx.cs and it says SqlException was unhandled by user code and Could not find stored procedure 'StoredProcedure2'.
If I use a try...catch and re-throw the exception from the catch handler, it hits Application_Error .
Anyway, thanks for your time.
|
|
|
|
|
I suspected some configuration issue here because the machines were used a lot before and so installed a fresh copy of Windows 8 and Visual Studio 2012.
Now I'm able to get it to work.
Thanks for your time.
However, I have one question.
Why is the debugger showing an exception in the .cs file before hitting Application_Error ?
Application_Error is hit only when F5 is pressed again after the exception is shown.
The exception can be see here - https://docs.google.com/file/d/0BwxeXZOAvlxJc28teld2R1BkVEk/edit?usp=sharing[^]
|
|
|
|
|
Now, since you share further steps, try to disable all code exceptions in VS:
Do Cntrl+Alt+E in Visual Studio and then uncheck all - Application_Error should get hit. I guess it does not work otherwise.
Worth a shot?
|
|
|
|
|
Thanks Sandeep,
It worked perfectly.
|
|
|
|
|
«_Superman_» wrote: It worked perfectly.
Awesome!
Glad I could help you out.
|
|
|
|
|
Hello Friends,
I have one query,If i use a multi-user system in that on main page there is a dashboard consider it as a grid in that grid value of xyz table is displayed.
As it is a multiuser system in that data can be inserted in that xyz table, if any user inserts data in the xyz table as soon as the user inserts the data the changes gets automatically reflected in main page dashboard.
Just like mail systems of gmail and all.
|
|
|
|
|
GridView Auto Refresh
In this tutorial i will let you know how to auto refresh or update GridView using AJAX Timer and UpdatePanel in asp.net. In this it is described that how a GridView is update after a specific time set in timer control.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" Interval="10000" runat="server" ontick="Timer1_Tick">
</asp:Timer>
<div>
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</div>
<asp:Label ID="update" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Timer1_Tick(object sender, EventArgs e)
{
databind();
update.Text = " Gridview Was Last Updated at " + DateTime.Now;
}
public void databind()
{
string strcon = ConfigurationManager.ConnectionStrings["con"].ConnectionString;
SqlConnection conn = new SqlConnection(strcon);
conn.Open();
string str = "select * from dept";
SqlCommand cmd = new SqlCommand(str, conn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
{
string sss = "xxx";
Response.AppendHeader("Refresh", "2");
if (!IsPostBack)
{
}
}
|
|
|
|
|
How to support the e-signature pad with crystal report and get the sign in asp.net?
|
|
|
|
|
Hi,
I am trying validating emailID against database without refreshing the page and without using the update panel.
I want to do it by client side script.
Is it possible?
Thank You.
|
|
|
|
|