Showing posts with label updatepanel. Show all posts
Showing posts with label updatepanel. Show all posts

Wednesday, March 28, 2012

ASP.NET Ajax Timer

Greetings,

i want to implement ajax timer so it will update an updatepanel every five seconds based on a certain codition so i try the following:

<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>

</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="UpdateTime">
</asp:Timer>

in the code behind i write the folowing:

protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToLongTimeString();

}
protected void UpdateTime(object sender, EventArgs e)
{
if (new Random().Next(0, 4) == 1)
{
UpdatePanel1.Update();
}

}

so what i notice that every five seconds the tick event will happen and the updatepanel1 will be updated regardless of the condition that i implement it in the UpdateTime method ,what is logic since the tick event happens.

so how can i solve this problem??

your help is highly appreciated

best regards

I tested your codes in Visual Studio .Net 2005 with Ajax RC 1.0.Try to change some of your codes as the following and it should work fine.
<div>
<asp:UpdatePanel ID="upnlTimer" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="lblTimer" runat="server" Text="Date Time"></asp:Label>
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick">
</asp:Timer>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
Wish the above can help you.

Thank you for the support

so what i add only the

<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server"ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="UpdateTime"></asp:Timer>
</ContentTemplate>

</asp:UpdatePanel>
</div>

so when i place the timer control within the contenttemplate of the updatepanel so i dont need to put the timer control within the triggers of the updatepanel

so what i conclude that it will not work if i place the timer control outside the update panel.

asp.net ajax refresh the UpdatePanel every 30 sec?

I am currently using Timer control inside my update panel to update automatically every 30 sec. However i wanted to use json to do the same thing.

Any suggestions?

Thanks

Hi,

JSON (JavaScript Object Notation) is a lightweight data-interchange format, or it can be viewed as a protocal defining how object is serialized when transporting.

It can't be used to perform actions at a certain interval like Timer.

Please refer to this for more information:http://msdn2.microsoft.com/en-us/library/bb299886.aspx

Hope this helps.

ASP.NET Ajax Probelm

has anyone else tried viewing a page that has an updatepanel in different browsers like Opera. It doesn't work I get the following exception

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

might be something that the team wants to look into. I dont' have a probelm with firefox or netscape

hello.

if i'm not wrong, opera isn't fully supported yet (though i'm really hoping that it is when the release version gets out)

Monday, March 26, 2012

ASP.NET AJAX Control Toolkit & UpdatePanel

All seems to me that ASP.NET AJAX Control Toolkit has a builtin feature that is able to deal by itself with all Ajax issues. That said, then wouldnt we need to use UpdatePanel anymore, since all these controls know how to deal with Ajax?

it is true that the control toolkit controls can update properly on their own. Like how you can use a calendar extender without needing it to be in a update panel with a textbox, they can both just be on the form. I still tend to user panels though simply because it helps me group sets of controls and visually makes it easy to see what kind of results i should expect when i know what controls are bound to what area on the screen. Using update panels has never cause me any extra problems so i stick with it


My fear is to make things redundant, and worse, degrade performance, since there would be 2 types of ajax treatment. One, dealt by UpdatePanel, and the other dealt by the control itself...

if you have you page up and running no problem without the use of update panels, then there is no need for them. It really comes down to how you have stuff set up I guess. I have pages with a lot of dynamically created controls like tables that are all updated individually (for when users edit them). And some of the editing features might include a calendar extender, so I would include that extender inside of the update panel that my table is in to group the controls because the interact with each other. But like i said, if your pages are set up in way that they work without update panels, then no worries :)

Asp.Net Ajax 1.0 goes odd with MapXtreme 2005 6.6

I put a scriptmanager and updatepanel in my web gis application base on MapXtreme 2005 6.6; everytime I click the contols in the updatepanel the web browser will refresh the whole web page which is odd for Asp.Net Ajax 1.0.

Then I put the same scriptmanager and updatepanel and my own controls into another web page without MapXtreme 2005 6.6, it goes exactly the way I want. But I wonder Asp.Net Ajax 1.0 FrameWork should work right in every asp.net web page with any web controls outside the updatepanels

Have you create AJAX Enabled Web Site...

Check the property of ScriptManager EnablePartialRendering="true" and for UpdatePanel UpdateMode="Conditional"

Saturday, March 24, 2012

ASP.NET AJAX : Get SelectedValue from AJAX-populated DDL inside an UpdatePanel after PostB

I think I accidentally posted this message in the wrong section, so I'm trying again:

I have a single AJAX UpdatePanel with 2 DropDownLists. The first one is populated from aDataBind on PageLoad (works fine). When the user selects an item from the first, the OnSelectedIndex posts back, and the second DropDownList is populated through AJAX with relevant information (also works fine). This gives me aCategory > SubCategory style for the DropDowns, and everything up until then works splendidly. The problem comes when I perform a regular (not-asynch) postback (which I do to retrieve the data from all the other controls on the page), the "SelectedValue" of the second DropDownList is always empty, regardless of what was selected.

I've tried catching the value in thePage_Init,Page_Load, andPage_PreRender, and it always shows up blank. Is there no way for a regular PostBack to retrieve data that was added to the page from an Asynchronous PostBack? I've got a very long page of controls, and I don't want to add them all to an UpdatePanel just to access this single control. Perhaps I'm just doing something stupid? Gurus?

I simplified the code to the problem areas, but I can post the whole deal if necessary. Thanks in advance!

Here's my ASCX:

1<asp:ScriptManager runat="server" EnablePartialRendering="true"></asp:ScriptManager>>23<asp:UpdatePanel runat="server" ID="CategoryUpdatePanel" UpdateMode="Conditional">4<Triggers>5<asp:AsyncPostBackTrigger ControlID="fld_Category" EventName="SelectedIndexChanged" />6</Triggers>7<ContentTemplate>8<asp:DropDownList ID="fld_Category" runat="server" AppendDataBoundItems="true" DataTextField="Title" DataValueField="CategoryId" AutoPostBack="true" OnSelectedIndexChanged="Category_SelectedIndexChanged" />9<asp:DropDownList ID="fld_SubCategory" runat="server" AppendDataBoundItems="true" DataTextField="Title" DataValueField="SubCategoryId" />10</ContentTemplate>11</asp:UpdatePanel>1213<asp:Button runat="server" Text="Perform Postback" OnClick="NormalPostBack" />

And my C#:

1protected void Page_Load(object sender, EventArgs e)2{3////// All This Works Fine4fld_Category.DataSource = Categories.GetAllCategories(); fld_Category.DataBind();5}67protected void Category_SelectedIndexChanged(object sender, EventArgs e)8{9////// All this works fine too.10fld_SubCategory.DataSource = Categories.GetSubCategories( fld_Category.SelectedValue );11fld_SubCategory.DataBind();12}1314protected void NormalPostBack(object sender, EventArgs e)15{16//////// This line always returns as empty, no matter what items were in it, or what was selected.17Response.Write("SubCategory selected value is : " + fld_SubCategory.SelectedValue);18}

I would wrap the Page_Load databinding code in a !IsPostBack conditional. That is still executed, even in partial postbacks.

What's probably happening is when you submit the form, fld_Category is changed back to its default value due to the re-databinding. Then, that fires Category_SelectedIndexChanged, which rebinds fld_SubCategory based on the default value of fld_Category. Or, something along those lines.

Also, you might be interested in using the toolkit'sCascadingDropDown Extender instead of reinventing the wheel. It'll take care of all this and will be faster too, since it doesn't use partial postbacks.


In your Page_Load event you are binding the dropedownList. But on every postBack it is rebinded

So value set to default. Asgt1329a suggested write your code under if(!Page.IsPostBack)


Thanks for the tips - I gave the CascadingDropDown Extender a try some months ago but wasn't able to find too many usage examples. Maybe I'll have an easier time with it this time around. Thanks!


Okay, here's a follow up question: I've got the CascadingDropDownList up and running on a page, but I can't seem to integrate it as a User Control without receiving the "Method 500" error. I've tried calling the data population method as a Web Service, and an in-page method (on the user-control side), but both return errors. I've seen some conflicting posts about this issues. Can a CDDL be used inside a User Control? Or does it have to be explicitly tied to a page?

Thanks for your help!


What happens if you call your service method manually? Usually when you get a error 500 from the CDDL, that's just being bubbled up from the web service itself, which is throwing an error.

Okay, I've figured it out. Turns out I was disabling the ViewState is another user control on the page. Once the ViewState was back in place, everything ran peachy. Thanks for your help, and sorry for wasting your time!


hello ,

protected void Page_Load(object sender, EventArgs e)
2{
3////// All This Works Fine
4fld_Category.DataSource = Categories.GetAllCategories(); fld_Category.DataBind();
5}
insted of above code you can write like this it will work fine:- 
protected void Page_Load(object sender, EventArgs e)
{
 if (!Page.IsPostBack)
{

fld_Category.DataSource = Categories.GetAllCategories();
 fld_Category.DataTextFeild="yourcolumnname"
 fld_Category.DataValueFeild="yourcolumnname"
 fld_Category.DataBind();

 }
}
protected void fld_Category_SelectedIndexChanged(object sender, EventArgs e)
{
 fld_SubCategory.DataSource = Categories.GetSubCategories( fld_Category.SelectedValue );
fld_SubCategory.DataTextFeild="yourcolumnname"
fld_SubCategory.DataValueFeild="yourcolumnname"
fld_SubCategory.DataBind(); 
} 
paste this code in your project it will work fine
NOTE:- Set property of fld_Category:- Autopostback=true; 
 

ASP.NET AJAX - Why IsPostBack=false?

I'm using ASP.NET AJAX. There is UpdatePanel on the page. It contains GridView. When I press "Edit", "Update" or "Cancel" button in the GridView then UpdatePanel reloads. Also executes code "if (!IsPostBack) { ... }" in Page_Load event on the server - but I don't need it!!! This code must run only once when page is loading for the first time (some time isPostBack=true, some time =false. But it must be =true everytime!),. This happens not every time when I click on EDIT / CANCEL but from time to time. I made some experiments and found the couse of such behavior. Here is the code:

Default.aspx

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Test Ajax + GridView</title></head><body> <form id="form1" runat="server"> <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" /> <asp:SqlDataSource ID="s1" runat="server" ConnectionString="...connectiong to Northwind..." SelectCommand="SELECT top 5 * FROM Categories" /> <div> <asp:UpdatePanel ID="update_lgota" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:GridView ID="grid_lgota" runat="server" AutoGenerateColumns="true" DataSourceID="s1"> <Columns> <asp:CommandField ButtonType="Image" ShowEditButton="True" EditImageUrl="~/images/btn_edit.gif" UpdateImageUrl="~/images/btn_update.gif" CancelImageUrl="~/images/btn_cancel.gif" /> </Columns> </asp:GridView> </ContentTemplate> </asp:UpdatePanel> </div> </form></body></html>

Default.aspx.cs

using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;public partialclass _Default : System.Web.UI.Page {protected void Page_Load(object sender, EventArgs e) {if (!IsPostBack) {string s ="FIRST"; } }}

Put Breakpoint (F9) into if (!isPostBack) { ... }. Then run project and press "EDIT" in the GridView. Some times (not everytime) this breakpoint will activates. So we get isPostBack=false during postback - this couse some logic mistakes on the page.

BUT If you delete a line:

ButtonType="Image"

from the Default.aspx file then everything begin to work correctly, isPostBack=true everytime! This is very strange, may be this is ERROR or BUG in VisualStudio OR maybe I do everything in the wrong way. Please explain me what's wrong in my code? Why isPostBack has incorrect value when I'm using ButtonType="Image"? Why IsPostBack=false on postback? (the same problem if I use IsAsynhPostBack and IsCallBack)

I have installed:
- Microsoft Visual Web Developer 2005 SP1
- ASP.NET 2.0 AJAX Extensions 1.0
- AjaxControlToolkit 1.0.10606.0

I think what you're looking for instead of(!IsPostBack) isIf (!ScriptManager.GetCurrent(Page).IsInAsyncPostBack).

http://www.asp.net/learn/ajax-videos/video-173.aspx



That is a bit odd. IsPostBack should definitely be true there.

You might consider changing that CommandField to a TemplateField to test. I have a GridView in an UpdatePanel that I just ran through the debugger to test, and its templated edit/update/cancel buttons do correctly cause Page.IsPostBack to be true during the partial postbacks they trigger.

For example, this is the command column in the grid I just tested:

<asp:TemplateField>
<ItemStyle Width="40px" HorizontalAlign="Center" />
<ItemTemplate>
<asp:ImageButton runat="server" ID="EditButton" CommandName="Edit" ImageUrl="~/Images/edit-wide.png" CausesValidation="false" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex")%>' OnCommand="EquipmentList_RowEditing" />
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton runat="server" ID="UpdateButton" CommandName="Update" ImageUrl="~/Images/ok.gif" CausesValidation="false" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex")%>' OnCommand="EquipmentList_RowUpdating" />
<asp:ImageButton runat="server" ID="CancelButton" CommandName="Cancel" ImageUrl="~/Images/cancel.gif" CausesValidation="false" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex")%>' OnCommand="EquipmentList_CancelEditing" />
</EditItemTemplate>
</asp:TemplateField>

Thanks. It was useful

ASP.Net Ajax - Making UpdatePanel invisible while loading the gridview inside update panel

This is my first ASP.net Ajax program. I have a gridview inside the UpdatePanel and DropDownList outside. On theSelectedIndexChanged of the dropdown I am loading the Gridview. While the gridview is getting loaded, the UpdateProgress contraol is displayed. My problem, after the gridview is displayed, when I select a different item from dropdown control, the gridview is displayed with the data from the previous select until it gets refreshed with new data. As soon as I change the select from dropdown, I want the gridview within the updatepanel to be invisible, until the data gets loaded. Following is the code snippet:

ProtectedSub ddl_manufacturer_SelectedIndexChanged(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles ddl_manufacturer.SelectedIndexChanged

lbl_ListHeader.Text =

"Manufacturer Price List For " & ddl_manufacturer.SelectedItem.Text

GrdView_manufPriceList.Visible =

False

UpdatePanel1.Visible =

False

LoadManufPriceList()

UpdatePanel1.Visible =

True

GrdView_manufPriceList.Visible =

True

EndSub

Thanks in advance.

bm!an,

I wanted the same effect and used the UpdatePanelAnimationExtender from the AJAX Control Toolkit (http://ajax.asp.net/ajaxtoolkit).

I simply set the OnUpdating animation to FadeOut and the OnUpdated animation to FadeIn. Worked like a charm.


Kalorm,

Thanks a lot. It worked.

ASP.Net 2.0: Does using an UpdatePanel reduce back-end server load?

Hi there,

I have been experimenting with the AJAX Extensions for a while, and I have been looking at performance and other related characteristics of AJAX-izing my controls.

One question that came to mind is whether an AJAX-enabled control can reduce the back-end processing load. It might have been published somewhere before, so I apologize for the repeat in that case.

I noticed that when the client causes an AJAX postback through an UpdatePanel, it seems that the server would reload the entire web form and all its components/controls, but just sends the new UpdatePanel content back to the client. While this most certianly reduces egress, the back-end processing cost is not reduced. And with the help of AJAX controls, people tend to put more content on the same page. And in an obscure way, it actually increases server load, because the cost to refresh a portion of the page is computationally equal to a full refresh of the page, which is now more expensive because we put more content in a single page (i.e. more DB hits, etc).

I reckon that there might be documented ways to indicate that a custom control is somewhat "independent" in that a refresh does not require new data outside of the control itself (e.g. a custom control that just updates the current time every time the user clicks a button), but I haven't found any yet. Ideally, this control can live in a complicated page that requires several DB hits to refresh, but it would be great to have a way where a refresh postback to this AJAX control would cause the server to only execute the code of this control, and not re-process the entire page and incurr several extra DB hits.

If anyone knows of any such tricks or guidelines, I would really appreciate it if you could share. :-)

Thanks in advance,
- K.

hello.

well, the only way you have to build controls that integrate into ASP.NET and that are refreshed without full postbacks is to use the ICallbackEventHandler interface that was build into ASP.NET. btw, I'm not sure that you'll be gaining much by using this approach, but it exists.

regarding your remarks, what I can say is that web built AJAX pages will have most of their load in the client side, and will only use web services (or handlers) to get its data from the server side. This means that you'll have lots of JS to write, but again, that is why AJAX has a J, right?


Yes the UpdatePanel does not reduce the Server Load. Instead it offloads the data transfer of the wire and you should properly use it. To create more scalable application you can choose the Cient Centric Development Model but in that case you may have to write quite a lot of JavaScript depending upon the applicaiton you are building.

Regarding the ICallback of the Control also executes the full life cycle of the page. Moreover it only supports string for request/response as there is no serializer which does not do the conversation which is the case of Asp.net Ajax.


Thank you Kazi, I think this concurrs with my thinking and I appreciate your help.

However, others please chime in if you have other comments or nifty tricks that I can use. Smile

Thanks,
- K.

ASP.Net 2.0: Can an UpdatePanel be placed inside a Control?

Hi all,

I recently discovered the power of ASP.Net AJAX Extensions and re-architected my site to take full advantage of it. I want to say Kudos to the DevDiv guys in MS to create such a powerful toolkit!

I converted most of my custom controls to use the AJAX ScriptLibrary and it is working very well. However, I noticed that if I place the UpdatePanel inside the control, the AJAX postback does not work and results in the whole page being updated. If I move the UpdatePanel back to the container ASPX Web Form, then the AJAX call works again. Is this somehow by design?

The really strange part is that I can place the UpdateProgress control inside my custom control and it still works, but I need to place the UpdatePanel outside of the custom control for the AJAX to work properly. Ideally, I would like the control to have its own UpdatePanel and UpdateProgress so I won't have to manage the UpdateProgress' "AssociatedUpdatePanelID" value in two separate places (i.e. in the custom control and in the web form).

Has anyone successfully done that, or is this going to be "fixed" in future releases?

Any help will be appreciated,
- K.

You need to expose the Update() event of the updatepanel and explicitly call it in response to whatever events are necessary.

http://www.asp.net/AJAX/Documentation/Live/tutorials/UsingUpdatePanelUserControls.aspx


Thanks DisturbedBuddha! I think this is what I am looking for.

Cheers,
- K.

Wednesday, March 21, 2012

asp controls unknown inside updatepanel in nested master

I have a master page with scriptmanager and update panel outside the contentplaceholder. Immediately the updatepanel and all nested master and non-master pages show all asp elements as unknown. If I move the update panel to inside the nested master content element it is still unknown as is all of the nested elements and pages.

I am running the december releases. I have un-installed and re-installed a couple of times. This is always the behavior. The code runs, but there is not intellisense and virtually everything is marked with the red underlines, and the error page is full (but doesn't stop the app coming up).

I looked at a number of posts suggesting rebuilding the toolbox. Nothing seems to help. However, the ajax toolkit controls are recognized because there is an @dotnet.itags.org.Register in the nested master.

Additionally, despite the post I found saying it had been fixed, I must keep my master pages open or none of the controls on any of the lower pages are recognized.

Anyone know of a post I missed about this issue?

/bump

I have the same issue.

In visual studio i create a new Ajax enabled website. I create a master page and a content page. The content page is to contain an update panel with some stuff in it. The AjaxControlToolkit is recognized while the Update Panel is not.

Cheers,

Michael


I'm also having this same problem. I have a Master page and my update panel is in the content page. AjaxControlToolkit controls are recognized but any controls within the update panel are not.
I'm also having this same problem. I have a Master page and my update panel is in the content page. AjaxControlToolkit controls are recognized but any controls within the update panel are not.

bump

I have 2 update panels (master/detail) that I am wiring together.

I am trying to make an object data source in UP2 use a praramater from a gridview in UP1. On creation of the data source, the Master gridview is not visible, but I hard coded it, and it actually works fine.

I think this is a bug in the UI of VS 2005.


Make sure you have the content inside your update panel wrapped with <ContentTemplate></ContentTemplate>

ASP components inside UpdatePanel been red underlined

I'd like if anyone has experienced the same issue than me.
Since I updated to Ajax Beta 1, each object or components that I placed inside an update panel aren't recognized, all are red underlined, and which is more annoying, and even if I'mm being able to complete the compilation and run the application, a lot of errors messages are being throwed (for example: Error 31 Element 'RadioButtonList' is not a known element. This can occur if there is a compilation error in the Web site) and it makes a little bit difficult to find errors during debugging.

I suppose I had missed a step during the upgrading, because I have not heard about other people with the same issue.

Any hint/suggestion to put me on the right way the solve this is welcome!!!

Thanks,

Scott Gu has a Gotcha on this. See his blog for the explanation.

ASP .NET Ajax, Windows Authentication and 401.1

Hi all!

I have a website on IIS with Windows Authentication only. Website uses UpdatePanel.

Scenario:

- some user is authenticated on site and browses it

- at some moment his password in Active Directory is changed

- after that user clicks somewhere on site (UpdatePanel tries to update its content)

- user sees Windows Authentication form, enters his login and incorrect password and then press OK three times

- he receives dialog with error message "Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occured while processing the request on the server. The status code returned from the server was: 401".

How to handle this error on the client? How can I redirect user to error page?

For now I found some simple solution. I just suppress error and refresh page.

<asp:ScriptManager

ID="ScriptManager1"

runat="server">

</asp:ScriptManager>

<scripttype="text/javascript"language="javascript">

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

function EndRequestHandler(sender, args)

{

if (args.get_error() != undefined)

{

args.set_errorHandled(true);location.reload(true);

}

}

</script>


Thanks a lot.

It is also a solution for all PageRequestManagerServerErrorException- Problems.

(12031, 12030, ...)

ASP .net Ajax updatepanel and file upload problem

hi, i am experiencing a problem of file upload and updatepanel. the file upload control does not work in updatepanel ..however i have written a trigger for the page clicking on which full postback will happen. but unfortunately this does not solve the problem. my upload control is not getting the posted file name upon full postback..it is inside the updatepanel. and i have to keep that control inside updatepanel.can anyone help me out this problem..?.thanks in advance...

Create a PostBackTrigger and assign the Button click event in that trigger which uploads the file.


hi,

i think u r using the file upload control only for selecting the file name. do u have any other button to upload that file. if u have a button for uploading put that button outside the update panel. Let the file upload control be inside the update panel

Hope this wil work.


i have used postback trigger but.no action...i have set the client id for adding that template(posting the file to database)...anything else?


it works in one page but fails to work in similar another page.....


In that case i would love to see the code. Would you mind posting that?


it's not working in this page.........

<%@. Page Language="C#" MasterPageFile="~/Master.master" AutoEventWireup="true" CodeFile="AddDocument.aspx.cs"
Inherits="AddDocument" %
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" colspan="5" style="height: 28px" valign="middle">
<table border="0" cellpadding="0" cellspacing="0" style="height: 28px">
<tr>
<td id="tdAddProduct" runat="server" align="center" class="bg_tab_select" style="height: 28px;width:129px"
valign="middle" >
<a class="tab_select_text" href="http://links.10026.com/?link=AddDocument.aspx">Add Document</a></td>
<td id="tdblAdd" runat="server" align="center" style="height: 28px; width: 4px;"
valign="middle">
<img height="10" src="http://pics.10026.com/?src=images/blank_w4.gif" width="4" alt="" /></td>
<td id="tdEditProduct" runat="server" align="center" class="bg_tab_unselect" style="height: 28px;width:129px"
valign="middle" >
<a class="tab_unselect_text" href="http://links.10026.com/?link=ViewDocument.aspx">Edit Document</a></td>
<td align="center" style="height: 28px;width:4px" valign="middle" >
<img height="10" src="http://pics.10026.com/?src=images/blank_w4.gif" width="4" alt="" /></td>
<td id="tdViewProduct" runat="server" align="center" class="bg_tab_unselect" style="height: 28px;width:129px"
valign="middle" >
<a class="tab_unselect_text" href="http://links.10026.com/?link=ViewDocument.aspx">View Document</a></td>
<td align="center" style="height: 28px;width:4px" valign="middle" >
<img height="10" src="http://pics.10026.com/?src=images/blank_w4.gif" width="4" alt="" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="6" align="center" valign="middle" style="width: 100%;" class="tab_area">
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="btnAddLeaseDeed" />
</Triggers

<contenttemplate>
<table style="width: 800px" align="left">
<tbody>
<tr>
<td style="width: 100%" valign="middle" align="center" colspan="6">
<asp:Label ID="lblErrorMsg" runat="server" CssClass="nor_txt" ForeColor="Red"></asp:Label></td>
</tr>
<tr>
<td style="width: 100%; height: 90px" valign="middle" align="left" colspan="6">

<table>
<tbody>
<tr>
<td style="width: 158px">
<asp:Label ID="lblSelectedItem" runat="server" CssClass="nor_txt1" Text="Select Document Type:"></asp:Label></td>
<td style="width: 117px">
<asp:DropDownList ID="ddlDocument" runat="server" CssClass="text_box" Width="82px"
OnSelectedIndexChanged="ddlDocument_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Selected="True" Text="--Select--" Value="0"></asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 158px">
<asp:Label ID="lblInsuranceType" runat="server" CssClass="nor_txt1" Text="Select Insurance Type:"
Visible="False"></asp:Label></td>
<td style="width: 117px">
<asp:DropDownList ID="ddlInsurance" runat="server" CssClass="text_box" Width="81px"
OnSelectedIndexChanged="ddlInsurance_SelectedIndexChanged" AutoPostBack="True"
Visible="False">
</asp:DropDownList></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="width: 100%" valign="middle" align="left" colspan="6">
</td>
</tr>
<tr>
<td style="width: 100%" valign="middle" align="center" colspan="6">
<asp:Panel ID="pnlLeaseDeed" runat="server" Width="100%" Visible="false">
<table style="width: 100%" align="left">
<tbody>
<tr style="font-size: 12pt; font-family: Times New Roman">
<td style="width: 100%" class="side_heading" valign="middle" align="center" colspan="6">
<asp:Label ID="lblLeaseDeed" runat="server" Text="Lease Deed"></asp:Label></td>
</tr>
<tr style="font-size: 12pt; font-family: Times New Roman">
<td style="width: 100%" valign="middle" align="center" colspan="6">
<table style="width: 100%">
<tbody>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="lblLocation" runat="server" CssClass="nor_txt1" Text="Location:"></asp:Label></td>
<td style="width: 573px" align="left">
<asp:DropDownList ID="ddlLocationLeaseDeed" runat="server" CssClass="text_box">
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 150px; text-align: left">
<asp:Label ID="lblAddress" runat="server" CssClass="nor_txt1" Text="Address:"></asp:Label></td>
<td style="width: 573px" align="left">
<asp:TextBox ID="txtAddress" runat="server" CssClass="text_box" TextMode="MultiLine"
Rows="3"></asp:TextBox>
<asp:RequiredFieldValidator ID="AddressRequiredFieldValidator" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" SetFocusOnError="True" ErrorMessage="Address is required"
ControlToValidate="txtAddress">Address is required</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 150px; height: 56px; text-align: left">
<asp:Label ID="lblDetailsOfLandlord" runat="server" CssClass="nor_txt1" Text="Details Of Landlord :"></asp:Label></td>
<td style="width: 573px" align="left">
<asp:TextBox ID="txtDetailsOfLandlord" runat="server" CssClass="text_box" TextMode="MultiLine"
Rows="3"></asp:TextBox>
<asp:RequiredFieldValidator ID="LandlordRequiredFieldValidator" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="LandLord Details is required" ControlToValidate="txtDetailsOfLandlord"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 150px; height: 22px; text-align: left">
<asp:Label ID="lblTypeOfAgreement" runat="server" CssClass="nor_txt1" Text="Type Of Agreement:"></asp:Label></td>
<td style="width: 573px; height: 22px" align="left">
<asp:TextBox ID="txtTypeOfAgreement" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="AgreeMentRequiredFieldValidator4" runat="server"
CssClass="nor_txt" ValidationGroup="LeaseDeed" ErrorMessage="Type of Agreement is required"
ControlToValidate="txtTypeOfAgreement"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 150px; height: 22px; text-align: left">
<asp:Label ID="Label2" runat="server" CssClass="nor_txt1" Text="Tenure of Agreement:"></asp:Label></td>
<td style="width: 573px; height: 22px" align="left">
<table>
<tbody>
<tr>
<td style="width: 100px">
<asp:Label ID="lblFromDate" runat="server" CssClass="nor_txt1" Text="From Date:"></asp:Label></td>
<td style="width: 296px">
<input id="txtFromDate" class="text_box" readonly type="text" runat="server" />
<asp:Image ID="Img1" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="FromDateRequiredFieldValidator" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="From Date is required" ControlToValidate="txtFromDate"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 100px">
<asp:Label ID="lblToDate" runat="server" CssClass="nor_txt1" Text="To Date:"></asp:Label></td>
<td style="width: 296px">
<input id="txtToDate" class="text_box" readonly type="text" runat="server" />
<asp:Image ID="Img2" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="ToDateRequiredFieldValidator5" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="To Date is required" ControlToValidate="txtToDate"></asp:RequiredFieldValidator></td>
</tr>
</tbody>
</table>
<asp:CompareValidator ID="CompareValidator1" runat="server" CssClass="nor_txt" ValidationGroup="LeaseDeed"
ErrorMessage="Tenure Of Agreement From Date should be before To Date" ControlToValidate="txtToDate"
Type="Date" Operator="GreaterThan" ControlToCompare="txtFromDate"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 150px; height: 22px" align="left">
<asp:Label ID="lnlMonths" runat="server" CssClass="nor_txt1" Text="Months:"></asp:Label></td>
<td style="width: 573px; height: 22px" align="left">
<asp:TextBox ID="txtMonths" runat="server" CssClass="text_box" ReadOnly="True"></asp:TextBox> <asp:Button
ID="BtnCalcMonth" OnClick="BtnCalcMonth_Click" runat="server" CssClass="text_box"
Text="calculate" BorderStyle="Inset"></asp:Button>
<asp:Label ID="lblErrorMonth" runat="server" CssClass="nor_txt" ForeColor="Red"></asp:Label></td>
</tr>
<tr>
<td style="width: 150px; height: 22px" align="left">
<asp:Label ID="lblArea" runat="server" CssClass="nor_txt1" Text="Super Area(Sq.Ft):"></asp:Label></td>
<td style="width: 573px; height: 22px" align="left">
<asp:TextBox ID="txtArea" runat="server" CssClass="text_box" AutoPostBack="True"
OnTextChanged="txtCurrentRate_TextChanged"></asp:TextBox>
<asp:RequiredFieldValidator ID="AreaRequiredFieldValidator" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="Area is required" ControlToValidate="txtArea"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator2" runat="server" CssClass="nor_txt" ValidationGroup="LeaseDeed"
SetFocusOnError="True" ErrorMessage="Area Should be Numeric" ControlToValidate="txtArea"
Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 150px; height: 22px" align="left">
<asp:Label ID="lblCurrentRent" runat="server" CssClass="nor_txt1" Text="Current Rent(Rs):"></asp:Label></td>
<td style="width: 573px; height: 22px" align="left">
<asp:TextBox ID="txtCurrentRate" runat="server" CssClass="text_box" AutoPostBack="True"
OnTextChanged="txtCurrentRate_TextChanged"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="Current Rent is required" ControlToValidate="txtCurrentRate"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator3" runat="server" CssClass="nor_txt" ValidationGroup="LeaseDeed"
SetFocusOnError="True" ErrorMessage="Current Rent Should be Numeric" ControlToValidate="txtCurrentRate"
Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="lblRate" runat="server" CssClass="nor_txt1" Text="Rate:"></asp:Label></td>
<td style="width: 573px" align="left">
<asp:TextBox ID="txtRate" runat="server" CssClass="text_box" ReadOnly="True"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 150px; height: 8px" align="left">
<asp:Label ID="lblEscalation" runat="server" CssClass="nor_txt1" Text="Escalations:"></asp:Label></td>
<td style="width: 573px; height: 8px" align="left">
</td>
</tr>
<tr>
<td style="height: 29px" align="center" colspan="2">
<asp:Button ID="btnAddEscalation" OnClick="btnAddEscalation_Click" runat="server"
CssClass="form_button_large" Text="Add Escalation"></asp:Button></td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Panel ID="pnlEscalation" runat="server" Width="100%">
<asp:DataGrid ID="gvwEscalation" runat="server" CssClass="tebale_border" ForeColor="Black"
Width="710px" Visible="False" OnItemCommand="gvwEscalation_ItemCommand" GridLines="None"
CellPadding="2" BorderWidth="1px" AutoGenerateColumns="False">
<FooterStyle BackColor="Tan" />
<SelectedItemStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<AlternatingItemStyle CssClass="alt_grid" />
<ItemStyle CssClass="nor_grid" />
<HeaderStyle CssClass="side_heading" HorizontalAlign="Center" />
<Columns>
<asp:BoundColumn DataField="SlNo" HeaderText="SlNo"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Amount">
<ItemTemplate>
<asp:TextBox ID="txtAmount" runat="server" CssClass="text_box" Text='<%# DataBinder.Eval(Container.DataItem,"Amount") %>'
Width="120px"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtAmount" ErrorMessage="Amount is mandatory"
ValidationGroup="LeaseDeed">*</asp:RequiredFieldValidator>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="From Date">
<ItemTemplate>
<input id="txtFromDateGrid" runat="server" class="text_box" readonly="readonly" size="20"
type="text" value='<%# DataBinder.Eval(Container.DataItem,"From Date") %>' />
<asp:Image ID="ImgFromDateGrid" runat="server" Height="18" ImageAlign="TextTop" ImageUrl="date_picker.jpg"
Width="20" /><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtFromDateGrid" ErrorMessage="From Date is mandatory" ValidationGroup="LeaseDeed">*</asp:RequiredFieldValidator>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="To Date">
<ItemTemplate>
<input id="txtToDateGrid" runat="server" class="text_box" readonly="readonly" type="text"
value='<%# DataBinder.Eval(Container.DataItem,"To Date") %>' />
<asp:Image ID="ImgToDate" runat="server" Height="18" ImageAlign="TextTop" ImageUrl="date_picker.jpg"
Width="20" /><asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="txtToDateGrid" ErrorMessage="To Date is mandatory" ValidationGroup="LeaseDeed">*</asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidatorDate" runat="server" ControlToCompare="txtFromDateGrid"
ControlToValidate="txtToDateGrid" CssClass="nor_txt" ErrorMessage="StartDate>EndDate"
Operator="GreaterThan" ValidationGroup="LeaseDeed"></asp:CompareValidator>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:Button ID="btnDelete" runat="server" CausesValidation="false" CommandName="Remove"
CssClass="form_button" Text="Remove" />
</ItemTemplate>
<HeaderStyle Width="100px" />
</asp:TemplateColumn>
</Columns>
</asp:DataGrid> </asp:Panel>
</td>
</tr>
<tr>
<td style="width: 150px; height: 22px; text-align: left" align="left">
<asp:Label ID="lblAdvanceRentals" runat="server" CssClass="nor_txt1" Text="Advance Rentals(Rs):"></asp:Label></td>
<td style="width: 573px; height: 22px" align="left">
<asp:TextBox ID="txtAdvanceRentals" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="Advance is required" ControlToValidate="txtAdvanceRentals"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator4" runat="server" CssClass="nor_txt" ValidationGroup="LeaseDeed"
SetFocusOnError="True" ErrorMessage="Advance Rentals Should be Numeric" ControlToValidate="txtAdvanceRentals"
Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 150px; height: 22px; text-align: left">
<asp:Label ID="lblDeposit" runat="server" CssClass="nor_txt1" Text="Deposit:"></asp:Label></td>
<td style="width: 573px; height: 22px" align="left">
<asp:TextBox ID="txtDeposit" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="Deposit is required" ControlToValidate="txtDeposit"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator5" runat="server" CssClass="nor_txt" ValidationGroup="LeaseDeed"
ErrorMessage="Deposit Should be Numeric" ControlToValidate="txtDeposit" Type="Double"
Operator="DataTypeCheck"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 150px; height: 22px" align="left">
<asp:Label ID="lblLockInPeriod" runat="server" CssClass="nor_txt1" Text="Lock-in Period:"></asp:Label> </td>
<td style="width: 573px; height: 22px" align="left">
<table>
<tbody>
<tr>
<td style="width: 100px; height: 22px">
<asp:Label ID="lblMonth" runat="server" CssClass="nor_txt1" Text="Month:"></asp:Label></td>
<td style="width: 410px; height: 22px">
<asp:DropDownList ID="ddlMonth" runat="server" CssClass="text_box">
</asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 100px">
<asp:Label ID="lblDate" runat="server" CssClass="nor_txt1" Text="Date:"></asp:Label></td>
<td style="width: 410px">
<input id="txtLocInDate" class="text_box" readonly type="text" runat="server" />
<asp:Image ID="Img4" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="Date is required" ControlToValidate="txtLocInDate"></asp:RequiredFieldValidator></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="width: 150px; height: 22px" align="left">
<asp:Label ID="lblNoticePeriod" runat="server" CssClass="nor_txt1" Text="Notice Period:"></asp:Label></td>
<td style="width: 573px; height: 22px" align="left">
<asp:TextBox ID="txtNoticePeriod" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="Notice period is required" ControlToValidate="txtNoticePeriod"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator7" runat="server" CssClass="nor_txt" ValidationGroup="LeaseDeed"
ErrorMessage="Notice Period Should be integer" ControlToValidate="txtNoticePeriod"
Type="Integer" Operator="DataTypeCheck" ValueToCompare="10"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 150px; height: 22px" align="left">
<asp:Label ID="lblAttachment1" runat="server" CssClass="nor_txt1" Text="Attachment :"></asp:Label></td>
<td style="width: 573px; height: 22px" align="left">
<asp:FileUpload ID="fuLeaseDeed" runat="server" CssClass="text_box"></asp:FileUpload>
<asp:RequiredFieldValidator ID="RequiredFieldValidator33" runat="server" CssClass="nor_txt"
ValidationGroup="LeaseDeed" ErrorMessage="Attachment is required" ControlToValidate="fuLeaseDeed"></asp:RequiredFieldValidator>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr style="font-size: 12pt; font-family: Times New Roman">
<td style="width: 728px" valign="middle" align="center" colspan="6">
<asp:Button ID="btnAddLeaseDeed" OnClick="btnAddLeaseDeed_Click" runat="server" CssClass="form_button_large"
Text="Add Lease Deed" ValidationGroup="LeaseDeed"></asp:Button></td>
</tr>
</tbody>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td style="width: 100%" valign="middle" align="left" colspan="6">
<asp:Panel ID="pnlMotorInsurance" runat="server" Width="100%" Visible="false">

<table style="width: 100%" align="left">
<tbody>
<tr>
<td style="width: 100%" valign="middle" align="center" colspan="6">
<table style="width: 100%">
<tbody>
<tr>
<td class="side_heading" align="center" colspan="2">
<asp:Label ID="lblMotorInsurance" runat="server" Text="Motor Insurance"></asp:Label></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="Label3" runat="server" CssClass="nor_txt1" Text="Location:"></asp:Label></td>
<td align="left">
<asp:DropDownList ID="ddlLocationMotorInsurance" runat="server" CssClass="text_box">
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblVehicleNo" runat="server" CssClass="nor_txt1" Text="Vehicle No:"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtVehicleNo" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Vehicle No. is required"
ControlToValidate="txtVehicleNo"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblModel" runat="server" CssClass="nor_txt1" Text="Model:"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtModel" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Model is required"
ControlToValidate="txtModel"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblCapacity" runat="server" CssClass="nor_txt1" Text="Capacity:"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtCapacity" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Capacity is required"
ControlToValidate="txtCapacity"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblDateOfPurchase" runat="server" CssClass="nor_txt1" Text="Date Of Purchase:"></asp:Label></td>
<td style="width: 429px" align="left">
<input id="txtDateOfPurchase" class="text_box" readonly type="text" runat="server" /> <asp:Image
ID="Img5" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" ErrorMessage="Date of Purchase is required"
ControlToValidate="txtDateOfPurchase"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px; height: 22px" align="left" colspan="1">
<asp:Label ID="lblPurchaseValue" runat="server" CssClass="nor_txt1" Text="Purchase Value:"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtPurchaseValue" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Purchase Value is required"
ControlToValidate="txtPurchaseValue"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator8" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance"
SetFocusOnError="True" ErrorMessage="Purchase Value Should be Numeric" ControlToValidate="txtPurchaseValue"
Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 147px; height: 22px" align="left" colspan="1">
<asp:Label ID="lblUserName" runat="server" CssClass="nor_txt1" Text="User Name:"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtUserName" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="User Name is required"
ControlToValidate="txtUserName"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblPolicyNo" runat="server" CssClass="nor_txt1" Text="Policy No:"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtPolicyNo" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Policy No. is required"
ControlToValidate="txtPolicyNo"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px; height: 32px" align="left" colspan="1">
<asp:Label ID="lblNameOfInsuranceCompany" runat="server" CssClass="nor_txt1" Text="Name Of Insurance Company:"
Width="162px"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtNameOfInsuranceCompany" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator20" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Name Of Insurance Company is required"
ControlToValidate="txtNameOfInsuranceCompany"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblRenewalDated" runat="server" CssClass="nor_txt1" Text="Renewal Dated:"></asp:Label></td>
<td style="width: 429px" align="left">
<input id="txtRenewalDated" class="text_box" readonly type="text" runat="server" /> <asp:Image
ID="Img6" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" ErrorMessage="Renewal Date is required" ControlToValidate="txtRenewalDated"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblExpiry" runat="server" CssClass="nor_txt1" Text="Expiry:"></asp:Label></td>
<td style="width: 429px" align="left">
<input id="txtExpiry" class="text_box" readonly type="text" runat="server" /> <asp:Image
ID="Img7" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" ErrorMessage="Expiry Date is required" ControlToValidate="txtExpiry"></asp:RequiredFieldValidator>
<br />
<asp:CompareValidator ID="CompareValidator11" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance"
ErrorMessage="Expiry Date should be after Renewal Date" ControlToValidate="txtExpiry"
Type="Date" Operator="GreaterThan" ControlToCompare="txtRenewalDated"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblPremiumAmount" runat="server" CssClass="nor_txt1" Text="Premium Amount:"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtPremiumAmount" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator21" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Premium Amount is required"
ControlToValidate="txtPremiumAmount"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator9" runat="server" CssClass="nor_txt" Width="174px"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Premium Amount Should be Numeric"
ControlToValidate="txtPremiumAmount" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblInsuredAmount" runat="server" CssClass="nor_txt1" Text="Insured Amount:"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtInsuredAmount" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Insured Amount is required"
ControlToValidate="txtInsuredAmount"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator10" runat="server" CssClass="nor_txt" Width="176px"
ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Insured Amount Should be Numeric"
ControlToValidate="txtInsuredAmount" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left" colspan="1">
<asp:Label ID="lblAttachment2" runat="server" CssClass="nor_txt1" Text="Attachment :"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:FileUpload ID="fuMotor" runat="server" CssClass="text_box"></asp:FileUpload>
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" CssClass="nor_txt"
ValidationGroup="MotorInsurance" ErrorMessage="Attachment is required" ControlToValidate="fuMotor"></asp:RequiredFieldValidator></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="width: 100%" valign="middle" align="center" colspan="6">
<asp:Button ID="btnAddMotorInsurance" OnClick="btnAddMotorInsurance_Click" runat="server"
CssClass="form_button_large" Text="Add Motor Insurance" ValidationGroup="MotorInsurance">
</asp:Button></td>
</tr>
</tbody>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td style="width: 100%" valign="middle" align="left" colspan="6">
<asp:Panel ID="pnlOfficeInsurance" runat="server" Width="100%" Visible="false">
<table style="width: 100%" align="left">
<tbody>
<tr>
<td style="width: 100%" class="side_heading" valign="middle" align="center" colspan="6">
<asp:Label ID="lblOfficeInsurance" runat="server" Text="Office Insurance"></asp:Label></td>
</tr>
<tr>
<td style="width: 100%" valign="middle" align="center" colspan="6">
<table style="width: 100%">
<tbody>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="Label5" runat="server" CssClass="nor_txt1" Text="Location:"></asp:Label></td>
<td style="width: 459px" align="left">
<asp:DropDownList ID="ddlLocationAddOfficeInsurance" runat="server" CssClass="text_box">
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="Label6" runat="server" CssClass="nor_txt1" Text="Policy No:"></asp:Label></td>
<td style="width: 429px; height: 21px" align="left">
<asp:TextBox ID="txtPolicyNoInsurance" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator23" runat="server" CssClass="nor_txt"
ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Policy No. is required"
ControlToValidate="txtPolicyNoInsurance"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="lblDateOfIssue" runat="server" CssClass="nor_txt1" Text="Date Of Issue:"></asp:Label></td>
<td style="width: 429px" align="left">
<input id="txtDateOfIssue" class="text_box" readonly type="text" runat="server" />
<asp:Image ID="Img8" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" CssClass="nor_txt"
ValidationGroup="OfficeInsurance" ErrorMessage="Date of Issue is required" ControlToValidate="txtDateOfIssue"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="Label7" runat="server" CssClass="nor_txt1" Text="Name Of Insurance Company:"
Width="166px"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtOfficeInsuranceCompany" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator24" runat="server" CssClass="nor_txt"
ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Name Of Insurance Company is required"
ControlToValidate="txtOfficeInsuranceCompany"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="lblNatureOfPolicy" runat="server" CssClass="nor_txt1" Text="Nature Of Policy:"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtNatureOfPolicy" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator25" runat="server" CssClass="nor_txt"
ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Nature Of Policy is required"
ControlToValidate="txtNatureOfPolicy"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 150px; height: 66px; text-align: left" align="left">
<asp:Label ID="lblExpiryDate" runat="server" CssClass="nor_txt1" Text="Expiry Date:"></asp:Label>
</td>
<td style="width: 429px; height: 66px" align="left">
<input id="txtExpairyDate" class="text_box" readonly type="text" runat="server" />
<asp:Image ID="Img9" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="RequiredFieldValidator26" runat="server" CssClass="nor_txt"
ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Expairy Date is required"
ControlToValidate="txtExpairyDate"></asp:RequiredFieldValidator><br />
<asp:CompareValidator ID="CompareValidator14" runat="server" CssClass="nor_txt" ValidationGroup="OfficeInsurance"
SetFocusOnError="True" ErrorMessage="Date of issue should be before Expairy Date"
ControlToValidate="txtExpairyDate" Type="Date" Operator="GreaterThan" ControlToCompare="txtDateOfIssue"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="Label8" runat="server" CssClass="nor_txt1" Text="Insured Amount:"></asp:Label>
</td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtOfficeInsuranceAmount" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator27" runat="server" CssClass="nor_txt"
ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Premium Amount is required"
ControlToValidate="txtOfficeInsuranceAmount"></asp:RequiredFieldValidator><br />
<asp:CompareValidator ID="CompareValidator12" runat="server" CssClass="nor_txt" Width="174px"
ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Premium Amount Should be Numeric"
ControlToValidate="txtPremiumAmountOffice" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="Label9" runat="server" CssClass="nor_txt1" Text="Premium Amount:"></asp:Label>
</td>
<td style="width: 429px" align="left">
<asp:TextBox ID="txtPremiumAmountOffice" runat="server" CssClass="text_box"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator28" runat="server" CssClass="nor_txt"
ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Insured Amount is required"
ControlToValidate="txtPremiumAmountOffice"></asp:RequiredFieldValidator>
<br />
<asp:CompareValidator ID="CompareValidator13" runat="server" CssClass="nor_txt" Width="176px"
ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Insured Amount Should be Numeric"
ControlToValidate="txtPremiumAmountOffice" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></td>
</tr>
<tr>
<td style="width: 150px" align="left">
<asp:Label ID="Label1" runat="server" CssClass="nor_txt1" Text="Attachment :"></asp:Label></td>
<td style="width: 429px" align="left">
<asp:FileUpload ID="fuOffice" runat="server" CssClass="text_box"></asp:FileUpload>
<asp:RequiredFieldValidator ID="RequiredFieldValidator35" runat="server" CssClass="nor_txt"
ValidationGroup="OfficeInsurance" ErrorMessage="Attachment is required" ControlToValidate="fuOffice"></asp:RequiredFieldValidator></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="width: 100%" valign="middle" align="center" colspan="6">
<asp:Button ID="btnAddOfficeInsuranceTemplate" OnClick="btnAddOfficeInsuranceTemplate_Click"
runat="server" CssClass="form_button_large" Text="Add Office Insurance" ValidationGroup="OfficeInsurance">
</asp:Button></td>
</tr>
</tbody>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td style="width: 100%" valign="middle" align="left" colspan="6">
<asp:Panel ID="pnlAMC" runat="server" Width="100%" Visible="false" HorizontalAlign="Center">
<table style="width: 100%" align="left">
<tbody>
<tr>
<td style="width: 100%; height: 17px; text-align: center" class="side_heading" valign="middle"
align="center" colspan="6">
<asp:Label ID="lblAMC" runat="server" Text="AMC"></asp:Label></td>
</tr>
<tr>
<td style="width: 100%; text-align: center" valign="middle" align="center" colspan="6">
<table style="width: 100%">
<tbody>
<tr>
<td style="width: 147px" align="left">
<asp:Label ID="lblVendorName" runat="server" CssClass="nor_txt1" Text="VendorName:"></asp:Label></td>
<td style="width: 460px" align="left">
<asp:DropDownList ID="ddlVendorName" runat="server" CssClass="text_box" OnSelectedIndexChanged="ddlVendorName_SelectedindexChanged"
AutoPostBack="True">
<asp:ListItem>Vendor Name2</asp:ListItem>
<asp:ListItem>Vendor Name1</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 147px" align="left">
<asp:Label ID="Label11" runat="server" CssClass="nor_txt1" Text="Address:"></asp:Label></td>
<td style="width: 460px" align="left">
<asp:TextBox ID="txtAMCAddress" runat="server" CssClass="text_box" TextMode="MultiLine"
Rows="3"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator29" runat="server" CssClass="nor_txt"
ValidationGroup="AMC" SetFocusOnError="True" ErrorMessage="Address is required"
ControlToValidate="txtAMCAddress"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left">
<asp:Label ID="lblPanTan" runat="server" CssClass="nor_txt1" Text="PAN/TAN:"></asp:Label></td>
<td style="width: 460px" align="left">
<asp:TextBox ID="txtPanTan" runat="server" CssClass="text_box" ReadOnly="True"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator30" runat="server" CssClass="nor_txt"
ValidationGroup="AMC" SetFocusOnError="True" ErrorMessage="PanTan is required"
ControlToValidate="txtPanTan"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 147px" align="left">
<asp:Label ID="lblStartDate" runat="server" CssClass="nor_txt1" Text="Start Date:"></asp:Label></td>
<td style="width: 460px" align="left">
<asp:TextBox ID="txtStartDate" runat="server" CssClass="text_box"></asp:TextBox> <asp:Image
ID="Img10" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="RequiredFieldValidator31" runat="server" CssClass="nor_txt"
ValidationGroup="AMC" SetFocusOnError="True" ErrorMessage="Start Date is required"
ControlToValidate="txtStartDate"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td style="width: 147px" align="left">
<asp:Label ID="lblEndDate" runat="server" CssClass="nor_txt1" Text="End Date:"></asp:Label></td>
<td style="width: 460px" align="left">
<asp:TextBox ID="txtEndDate" runat="server" CssClass="text_box"></asp:TextBox>
<asp:Image ID="Img11" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop"
Height="18"></asp:Image>
<asp:RequiredFieldValidator ID="RequiredFieldValidator32" runat="server" CssClass="nor_txt"
ValidationGroup="AMC" SetFocusOnError="True" ErrorMessage="End Date is required"
ControlToValidate="txtEndDate"></asp:RequiredFieldValidator><br />
<asp:CompareValidator ID="CompareValidator15" runat="server" CssClass="nor_txt" ValidationGroup="AMC"
SetFocusOnError="True" ErrorMessage="Start Date should be before End Date"
ControlToValidate="txtEndDate" Type="Date" Operator="GreaterThan" ControlToCompare="txtStartDate"></asp:CompareValidator></td>
</tr>
<tr>
<td style="height: 21px; text-align: center" align="left" colspan="2">
<asp:Button ID="btnAddServiceSchedule" OnClick="btnAddServiceSchedule_Click" runat="server"
CssClass="form_button_large" Text="Add Service Schedule"></asp:Button></td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Panel ID="pnlServiceSchedule" runat="server" Width="100%">
<br />
<asp:DataGrid ID="gvwServiceSchedule" runat="server" CssClass="tebale_border" ForeColor="Black"
Width="710px" Visible="False" OnItemCommand="gvwServiceSchedule_ItemCommand"
GridLines="None" CellPadding="2" BorderWidth="1px" AutoGenerateColumns="False">
<FooterStyle BackColor="Tan" />
<SelectedItemStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<AlternatingItemStyle CssClass="alt_grid" />
<ItemStyle CssClass="nor_grid" />
<HeaderStyle CssClass="side_heading" HorizontalAlign="Center" />
<Columns>
<asp:BoundColumn DataField="SlNo" HeaderText="SlNo"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Service Date">
<ItemTemplate>
<input id="txtServiceDate" runat="server" class="text_box" readonly="readonly" type="text"
value='<%# DataBinder.Eval(Container.DataItem,"Service Date") %>' />
<asp:Image ID="ImgDateGrid" runat="server" Height="18" ImageAlign="TextTop" ImageUrl="date_picker.jpg"
Width="20" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtServiceDate"
ErrorMessage="Service Date is mandatory" ValidationGroup="AMC">*</asp:RequiredFieldValidator>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:Button ID="btnDelete" runat="server" CausesValidation="false" CommandName="Remove"
CssClass="form_button" Text="Remove" />
</ItemTemplate>
<HeaderStyle Width="100px" />
</asp:TemplateColumn>
</Columns>
</asp:DataGrid> </asp:Panel>
</td>
</tr>
<tr>
<td style="width: 147px" align="left">
<asp:Label ID="lblAttachment3" runat="server" CssClass="nor_txt1" Text="Attachment :"></asp:Label></td>
<td style="width: 460px" align="left">
<asp:FileUpload ID="fuAMC" runat="server" CssClass="text_box"></asp:FileUpload>
<asp:RequiredFieldValidator ID="RequiredFieldValidator34" runat="server" CssClass="nor_txt"
ValidationGroup="AMC" ErrorMessage="Attachment is required" ControlToValidate="fuAMC"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 100%; text-align: left" colspan="2">
</td>
</tr>
</tbody>
</table>
<asp:Button ID="btnAddAMC" OnClick="btnAddAMC_Click" runat="server" CssClass="form_button"
Text="AddAMC" ValidationGroup="AMC"></asp:Button></td>
</tr>
</tbody>
</table>
</asp:Panel>
</td>
</tr>
</tbody>
</table>
</contenttemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Content>


but working in this page,........

<%@. Page Language="C#" MasterPageFile="~/Master.master" AutoEventWireup="true" CodeFile="EditDocument.aspx.cs"
Inherits="EditDocument" %
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" colspan="5" style="height: 28px" valign="middle">
<table border="0" cellpadding="0" cellspacing="0" style="height: 28px">
<tr>
<td id="tdAddProduct" runat="server" align="center" class="bg_tab_unselect" style="height: 28px"
valign="middle" width="129">
<a class="tab_unselect_text" href="http://links.10026.com/?link=AddDocument.aspx">Add Document</a></td>
<td id="tdblAdd" runat="server" align="center" style="height: 28px; width: 4px;" valign="middle">
<img height="10" src="http://pics.10026.com/?src=images/blank_w4.gif" width="4" /></td>
<td id="tdEditProduct" runat="server" align="center" class="bg_tab_select" style="height: 28px"
valign="middle" width="129">
<a class="tab_select_text" href="http://links.10026.com/?link=EditDocument.aspx">Edit Document</a></td>
<td align="center" style="height: 28px" valign="middle" width="4">
<img height="10" src="http://pics.10026.com/?src=images/blank_w4.gif" width="4" /></td>
<td id="tdViewProduct" runat="server" align="center" class="bg_tab_unselect" style="height: 28px"
valign="middle" width="129">
<a class="tab_unselect_text" href="http://links.10026.com/?link=ViewDocument.aspx">View Document</a></td>
<td align="center" style="height: 28px" valign="middle" width="4">
<img height="10" src="http://pics.10026.com/?src=images/blank_w4.gif" width="4" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="404" colspan="6" align="center" valign="middle" style="width: 100%;" class="tab_area">
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager
<asp:UpdatePanel id="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="btnUpdateLeaseDeed" />
</Triggers>
<Triggers>
<asp:PostBackTrigger ControlID="lnkAttachLeaseDeed" />
</Triggers>
<Triggers>
<asp:PostBackTrigger ControlID="btnUpdateMotorInsurance" />
</Triggers>
<Triggers>
<asp:PostBackTrigger ControlID="lnkAttachMotor" />
</Triggers>
<Triggers>
<asp:PostBackTrigger ControlID="btnUpdateOfficeInsuranceTemplate" />
</Triggers>
<Triggers>
<asp:PostBackTrigger ControlID="lnkAttachOffice" />
</Triggers>
<Triggers>
<asp:PostBackTrigger ControlID="btnUpdateAMC" />
</Triggers>
<Triggers>
<asp:PostBackTrigger ControlID="lnkAttachAMC" />
</Triggers>
<contenttemplate>
<TABLE style="WIDTH: 800px" align=left><TBODY><TR><TD style="WIDTH: 100%" vAlign=middle align=center colSpan=6><asp:Label id="lblErrorMsg" runat="server" CssClass="nor_txt" ForeColor="Red"></asp:Label></TD></TR><TR><TD style="WIDTH: 100%" vAlign=middle align=left colSpan=6></TD></TR><TR><TD style="WIDTH: 100%" vAlign=middle align=center colSpan=6><asp:Panel id="pnlLeaseDeed" runat="server" Width="100%" Visible="false"><TABLE style="WIDTH: 100%" align=left><TBODY><TR><TD style="WIDTH: 100%; HEIGHT: 17px" class="side_heading" vAlign=middle align=center colSpan=6><asp:Label id="lblLeaseDeed" runat="server" Text="Lease Deed" __designer:wfdid="w153"></asp:Label></TD></TR><TR><TD style="WIDTH: 100%; HEIGHT: 812px" vAlign=middle align=center colSpan=6><TABLE style="WIDTH: 100%"><TBODY><TR><TD style="WIDTH: 150px" align=left><asp:Label id="lblLocation" runat="server" CssClass="nor_txt1" Text="Location:" __designer:wfdid="w154"></asp:Label></TD><TD style="WIDTH: 459px" align=left><asp:DropDownList id="ddlLocationLeaseDeed" runat="server" CssClass="text_box" __designer:wfdid="w155" AutoPostBack="True">
</asp:DropDownList></TD></TR><TR><TD style="WIDTH: 150px; TEXT-ALIGN: left"><asp:Label id="lblAddress" runat="server" CssClass="nor_txt1" Text="Address:" __designer:wfdid="w156"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtAddress" runat="server" CssClass="text_box" __designer:wfdid="w157" TextMode="MultiLine" Rows="3"></asp:TextBox> <asp:RequiredFieldValidator id="AddressRequiredFieldValidator" runat="server" CssClass="nor_txt" __designer:wfdid="w158" ValidationGroup="LeaseDeed" SetFocusOnError="True" ErrorMessage="Address is required" ControlToValidate="txtAddress">Address is required</asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 56px; TEXT-ALIGN: left"><asp:Label id="lblDetailsOfLandlord" runat="server" CssClass="nor_txt1" Text="Details Of Landlord :" __designer:wfdid="w159"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtDetailsOfLandlord" runat="server" CssClass="text_box" __designer:wfdid="w160" TextMode="MultiLine" Rows="3"></asp:TextBox> <asp:RequiredFieldValidator id="LandlordRequiredFieldValidator" runat="server" CssClass="nor_txt" __designer:wfdid="w161" ValidationGroup="LeaseDeed" ErrorMessage="LandLord Details is required" ControlToValidate="txtDetailsOfLandlord"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 150px; TEXT-ALIGN: left"><asp:Label id="lblTypeOfAgreement" runat="server" CssClass="nor_txt1" Text="Type Of Agreement:" __designer:wfdid="w162"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtTypeOfAgreement" runat="server" CssClass="text_box" __designer:wfdid="w163"></asp:TextBox> <asp:RequiredFieldValidator id="AgreeMentRequiredFieldValidator4" runat="server" CssClass="nor_txt" __designer:wfdid="w164" ValidationGroup="LeaseDeed" ErrorMessage="Type of Agreement is required" ControlToValidate="txtTypeOfAgreement"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px; TEXT-ALIGN: left"><asp:Label id="Label2" runat="server" CssClass="nor_txt1" Text="Tenure of Agreement:" __designer:wfdid="w165"></asp:Label></TD><TD style="HEIGHT: 22px" align=left><TABLE><TBODY><TR><TD style="WIDTH: 100px; HEIGHT: 22px"><asp:Label id="lblFromDate" runat="server" CssClass="nor_txt1" Text="From Date:" __designer:wfdid="w166"></asp:Label></TD><TD style="WIDTH: 296px; HEIGHT: 22px"><INPUT id="txtFromDate" class="text_box" readOnly type=text runat="server" /> <asp:Image id="Img1" runat="server" Width="20" __designer:wfdid="w167" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="FromDateRequiredFieldValidator" runat="server" CssClass="nor_txt" __designer:wfdid="w168" ValidationGroup="LeaseDeed" ErrorMessage="From Date is required" ControlToValidate="txtFromDate"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 100px"><asp:Label id="lblToDate" runat="server" CssClass="nor_txt1" Text="To Date:" __designer:wfdid="w169"></asp:Label></TD><TD style="WIDTH: 296px"><INPUT id="txtToDate" class="text_box" readOnly type=text runat="server" /> <asp:Image id="Img2" runat="server" Width="20" __designer:wfdid="w170" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="ToDateRequiredFieldValidator5" runat="server" CssClass="nor_txt" __designer:wfdid="w171" ValidationGroup="LeaseDeed" ErrorMessage="To Date is required" ControlToValidate="txtToDate"></asp:RequiredFieldValidator></TD></TR></TBODY></TABLE><asp:CompareValidator id="CompareValidator1" runat="server" CssClass="nor_txt" __designer:wfdid="w172" ValidationGroup="LeaseDeed" ErrorMessage="Tenure Of Agreement From Date should be before To Date" ControlToValidate="txtToDate" Type="Date" Operator="GreaterThan" ControlToCompare="txtFromDate"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px" align=left><asp:Label id="lnlMonths" runat="server" CssClass="nor_txt1" Text="Months:" __designer:wfdid="w173"></asp:Label></TD><TD style="HEIGHT: 22px" align=left><asp:TextBox id="txtMonths" runat="server" CssClass="text_box" __designer:wfdid="w174" ReadOnly="True"></asp:TextBox> <asp:Button id="BtnCalcMonth" onclick="BtnCalcMonth_Click" runat="server" CssClass="text_box" Text="calculate" __designer:wfdid="w175" BorderStyle="Inset"></asp:Button> <asp:Label id="lblErrorMonth" runat="server" CssClass="nor_txt" ForeColor="Red" __designer:wfdid="w176"></asp:Label></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px" align=left><asp:Label id="lblArea" runat="server" CssClass="nor_txt1" Text="Super Area(Sq.Ft):" __designer:wfdid="w177"></asp:Label></TD><TD style="HEIGHT: 22px" align=left><asp:TextBox id="txtArea" runat="server" CssClass="text_box" __designer:wfdid="w178" AutoPostBack="True" OnTextChanged="txtCurrentRate_TextChanged"></asp:TextBox> <asp:RequiredFieldValidator id="AreaRequiredFieldValidator" runat="server" CssClass="nor_txt" __designer:wfdid="w179" ValidationGroup="LeaseDeed" ErrorMessage="Area is required" ControlToValidate="txtArea"></asp:RequiredFieldValidator> <asp:CompareValidator id="CompareValidator2" runat="server" CssClass="nor_txt" __designer:wfdid="w180" ValidationGroup="LeaseDeed" SetFocusOnError="True" ErrorMessage="Area Should be Numeric" ControlToValidate="txtArea" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px" align=left><asp:Label id="lblCurrentRent" runat="server" CssClass="nor_txt1" Text="Current Rent(Rs):" __designer:wfdid="w181"></asp:Label></TD><TD style="HEIGHT: 22px" align=left><asp:TextBox id="txtCurrentRate" runat="server" CssClass="text_box" __designer:wfdid="w182" AutoPostBack="True" OnTextChanged="txtCurrentRate_TextChanged"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator4" runat="server" CssClass="nor_txt" __designer:wfdid="w183" ValidationGroup="LeaseDeed" ErrorMessage="Current Rent is required" ControlToValidate="txtCurrentRate"></asp:RequiredFieldValidator> <asp:CompareValidator id="CompareValidator3" runat="server" CssClass="nor_txt" __designer:wfdid="w184" ValidationGroup="LeaseDeed" SetFocusOnError="True" ErrorMessage="Current Rent Should be Numeric" ControlToValidate="txtCurrentRate" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 150px" align=left><asp:Label id="lblRate" runat="server" CssClass="nor_txt1" Text="Rate:" __designer:wfdid="w185"></asp:Label></TD><TD align=left><asp:TextBox id="txtRate" runat="server" CssClass="text_box" __designer:wfdid="w186" ReadOnly="True"></asp:TextBox> </TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 8px" align=left><asp:Label id="lblEscalation" runat="server" CssClass="nor_txt1" Text="Escalations:" __designer:wfdid="w187"></asp:Label></TD><TD style="WIDTH: 429px; HEIGHT: 8px" align=left></TD></TR><TR><TD style="HEIGHT: 29px" align=center colSpan=2><asp:Button id="btnEditEscalation" onclick="btnEditEscalation_Click" runat="server" CssClass="form_button_large" Text="Add Escalation" __designer:wfdid="w188"></asp:Button></TD></TR><TR><TD align=center colSpan=2><asp:Panel id="pnlEscalation" runat="server" Width="100%" __designer:wfdid="w189"><asp:DataGrid id="gvwEscalation" runat="server" CssClass="tebale_border" ForeColor="Black" Width="750px" Visible="False" HorizontalAlign="Center" __designer:wfdid="w190" OnItemCommand="gvwEscalation_ItemCommand" GridLines="None" CellPadding="2" BorderWidth="1px" AutoGenerateColumns="False">
<FooterStyle BackColor="Tan" />
<SelectedItemStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<AlternatingItemStyle CssClass="alt_grid" />
<ItemStyle CssClass="nor_grid" />
<HeaderStyle CssClass="side_heading" HorizontalAlign="Center" />
<Columns>
<asp:BoundColumn DataField="SlNo" HeaderText="SlNo"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="EscalationId" Visible="False">
<ItemTemplate>
<asp:TextBox ID="txtEscalationId" runat="server" CssClass="text_box" Text='<%# DataBinder.Eval(Container.DataItem,"EscalationId") %>'
Visible="false" Width="120px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Amount">
<ItemTemplate>
<asp:TextBox ID="txtAmount" runat="server" CssClass="text_box" Text='<%# DataBinder.Eval(Container.DataItem,"Amount") %>'
Width="120px"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtAmount" ErrorMessage="Amount is mandatory"
ValidationGroup="LeaseDeed">*</asp:RequiredFieldValidator>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="From Date">
<ItemTemplate>
<input id="txtFromDateGrid" runat="server" class="text_box" readonly="readonly" size="20"
type="text" value='<%# DataBinder.Eval(Container.DataItem,"From Date") %>' />
<asp:Image ID="ImgFromDateGrid" runat="server" Height="18" ImageAlign="TextTop" ImageUrl="date_picker.jpg"
Width="20" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtFromDateGrid"
ErrorMessage="From Date is mandatory" ValidationGroup="LeaseDeed">*</asp:RequiredFieldValidator>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="To Date">
<ItemTemplate>
<input id="txtToDateGrid" runat="server" class="text_box" readonly="readonly" type="text"
value='<%# DataBinder.Eval(Container.DataItem,"To Date") %>' />
<asp:Image ID="ImgToDate" runat="server" Height="18" ImageAlign="TextTop" ImageUrl="date_picker.jpg"
Width="20" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtToDateGrid"
ErrorMessage="To Date is mandatory" ValidationGroup="LeaseDeed">*</asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidatorDate" runat="server" ControlToCompare="txtFromDateGrid"
ControlToValidate="txtToDateGrid" CssClass="nor_txt" ErrorMessage="StartDate>EndDate"
Operator="GreaterThan" ValidationGroup="LeaseDeed"></asp:CompareValidator>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:Button ID="btnDelete" runat="server" CausesValidation="false" CommandName="Remove"
CssClass="form_button" Text="Remove" />
</ItemTemplate>
<HeaderStyle Width="100px" />
</asp:TemplateColumn>
</Columns>
</asp:DataGrid> </asp:Panel> </TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px; TEXT-ALIGN: left" align=left><asp:Label id="lblAdvanceRentals" runat="server" CssClass="nor_txt1" Text="Advance Rentals(Rs):" __designer:wfdid="w191"></asp:Label></TD><TD style="WIDTH: 429px; HEIGHT: 22px" align=left><asp:TextBox id="txtAdvanceRentals" runat="server" CssClass="text_box" __designer:wfdid="w192"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator5" runat="server" CssClass="nor_txt" __designer:wfdid="w193" ValidationGroup="LeaseDeed" ErrorMessage="Advance is required" ControlToValidate="txtAdvanceRentals"></asp:RequiredFieldValidator> <asp:CompareValidator id="CompareValidator4" runat="server" CssClass="nor_txt" __designer:wfdid="w194" ValidationGroup="LeaseDeed" SetFocusOnError="True" ErrorMessage="Advance Rentals Should be Numeric" ControlToValidate="txtAdvanceRentals" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px; TEXT-ALIGN: left"><asp:Label id="lblDeposit" runat="server" CssClass="nor_txt1" Text="Deposit:" __designer:wfdid="w195"></asp:Label></TD><TD style="WIDTH: 429px; HEIGHT: 22px" align=left><asp:TextBox id="txtDeposit" runat="server" CssClass="text_box" __designer:wfdid="w196"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator6" runat="server" CssClass="nor_txt" __designer:wfdid="w197" ValidationGroup="LeaseDeed" ErrorMessage="Deposit is required" ControlToValidate="txtDeposit"></asp:RequiredFieldValidator> <asp:CompareValidator id="CompareValidator5" runat="server" CssClass="nor_txt" __designer:wfdid="w198" ValidationGroup="LeaseDeed" ErrorMessage="Deposit Should be Numeric" ControlToValidate="txtDeposit" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px" align=left><asp:Label id="lblLockInPeriod" runat="server" CssClass="nor_txt1" Text="Lock-in Period:" __designer:wfdid="w199"></asp:Label> </TD><TD style="HEIGHT: 22px" align=left><TABLE><TBODY><TR><TD style="WIDTH: 100px; HEIGHT: 22px"><asp:Label id="lblMonth" runat="server" CssClass="nor_txt1" Text="Month:" __designer:wfdid="w200"></asp:Label></TD><TD style="WIDTH: 410px; HEIGHT: 22px"><asp:DropDownList id="ddlMonth" runat="server" CssClass="text_box" __designer:wfdid="w201">
</asp:DropDownList> </TD></TR><TR><TD style="WIDTH: 100px"><asp:Label id="lblDate" runat="server" CssClass="nor_txt1" Text="Date:" __designer:wfdid="w202"></asp:Label></TD><TD style="WIDTH: 410px"><INPUT id="txtLocInDate" class="text_box" readOnly type=text runat="server" /> <asp:Image id="Img4" runat="server" Width="20" __designer:wfdid="w203" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="RequiredFieldValidator8" runat="server" CssClass="nor_txt" __designer:wfdid="w204" ValidationGroup="LeaseDeed" ErrorMessage="Date is required" ControlToValidate="txtLocInDate"></asp:RequiredFieldValidator></TD></TR></TBODY></TABLE></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px" align=left><asp:Label id="lblNoticePeriod" runat="server" CssClass="nor_txt1" Text="Notice Period:" __designer:wfdid="w205"></asp:Label></TD><TD style="WIDTH: 429px; HEIGHT: 22px" align=left><asp:TextBox id="txtNoticePeriod" runat="server" CssClass="text_box" __designer:wfdid="w206"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator9" runat="server" CssClass="nor_txt" __designer:wfdid="w207" ValidationGroup="LeaseDeed" ErrorMessage="Notice period is required" ControlToValidate="txtNoticePeriod"></asp:RequiredFieldValidator> <asp:CompareValidator id="CompareValidator7" runat="server" CssClass="nor_txt" __designer:wfdid="w208" ValidationGroup="LeaseDeed" ErrorMessage="Notice Period Should be integer" ControlToValidate="txtNoticePeriod" Type="Integer" Operator="DataTypeCheck" ValueToCompare="10"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px" align=left><asp:Label id="lblAttachment1" runat="server" CssClass="nor_txt1" Text="Attachment :" __designer:wfdid="w209"></asp:Label></TD><TD style="WIDTH: 429px; HEIGHT: 22px" align=left><asp:FileUpload id="fuLeaseDeed" runat="server" CssClass="text_box" __designer:wfdid="w210"></asp:FileUpload> <asp:LinkButton id="lnkAttachLeaseDeed" onclick="lnkAttachLeaseDeed_Click" runat="server" CssClass="lnk_txt" __designer:wfdid="w211">View Uploaded Document</asp:LinkButton> </TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px" align=left><asp:Label id="lblRemarksLeaseDeed" runat="server" CssClass="nor_txt1" Text="Remarks :" __designer:wfdid="w212"></asp:Label></TD><TD style="WIDTH: 429px; HEIGHT: 22px" align=left><asp:TextBox id="txtRemarksLeaseDeed" runat="server" CssClass="text_box" __designer:wfdid="w213" TextMode="MultiLine" Rows="3"></asp:TextBox></TD></TR></TBODY></TABLE></TD></TR><TR><TD style="WIDTH: 100%; HEIGHT: 54px" vAlign=middle align=center colSpan=6><TABLE style="WIDTH: 100%"><TBODY><TR><TD style="HEIGHT: 29px" align=center colSpan=2><asp:Button id="btnUpdateLeaseDeed" onclick="btnUpdateLeaseDeed_Click" runat="server" CssClass="form_button_large" Text="Update Lease Deed" __designer:wfdid="w214" ValidationGroup="LeaseDeed"></asp:Button><asp:Button id="btnCloseLeaseDeed" runat="server" CausesValidation="false" CssClass="form_button" Text="Close" __designer:wfdid="w215" PostBackUrl="~/ViewDocument.aspx"></asp:Button></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></asp:Panel> </TD></TR><TR style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman"><TD style="WIDTH: 100%" vAlign=middle align=left colSpan=6><asp:Panel id="pnlMotorInsurance" runat="server" Width="100%" Visible="false"> <TABLE style="WIDTH: 100%" align=left><TBODY><TR><TD style="WIDTH: 100%" vAlign=middle align=center colSpan=6><TABLE style="WIDTH: 100%"><TBODY><TR><TD class="side_heading" align=center colSpan=2><asp:Label id="lblMotorInsurance" runat="server" Text="Motor Insurance"></asp:Label></TD></TR><TR><TD style="WIDTH: 147px; HEIGHT: 22px" align=left colSpan=1><asp:Label id="Label3" runat="server" CssClass="nor_txt1" Text="Location:"></asp:Label></TD><TD style="HEIGHT: 22px" align=left><asp:DropDownList id="ddlLocationMotorInsurance" runat="server" CssClass="text_box" AutoPostBack="True">
</asp:DropDownList></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblVehicleNo" runat="server" CssClass="nor_txt1" Text="Vehicle No:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtVehicleNo" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator14" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Vehicle No. is required" ControlToValidate="txtVehicleNo"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblModel" runat="server" CssClass="nor_txt1" Text="Model:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtModel" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator15" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Model is required" ControlToValidate="txtModel"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblCapacity" runat="server" CssClass="nor_txt1" Text="Capacity:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtCapacity" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator16" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Capacity is required" ControlToValidate="txtCapacity"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblDateOfPurchase" runat="server" CssClass="nor_txt1" Text="Date Of Purchase:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><INPUT id="txtDateOfPurchase" class="text_box" readOnly type=text runat="server" /> <asp:Image id="Img5" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="RequiredFieldValidator10" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" ErrorMessage="Date of Purchase is required" ControlToValidate="txtDateOfPurchase"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px; HEIGHT: 22px" align=left colSpan=1><asp:Label id="lblPurchaseValue" runat="server" CssClass="nor_txt1" Text="Purchase Value:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtPurchaseValue" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator17" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Purchase Value is required" ControlToValidate="txtPurchaseValue"></asp:RequiredFieldValidator> <asp:CompareValidator id="CompareValidator8" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Purchase Value Should be Numeric" ControlToValidate="txtPurchaseValue" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 147px; HEIGHT: 22px" align=left colSpan=1><asp:Label id="lblUserName" runat="server" CssClass="nor_txt1" Text="User Name:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtUserName" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator18" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="User Name is required" ControlToValidate="txtUserName"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblPolicyNo" runat="server" CssClass="nor_txt1" Text="Policy No:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtPolicyNo" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator19" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Policy No. is required" ControlToValidate="txtPolicyNo"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px; HEIGHT: 32px" align=left colSpan=1><asp:Label id="lblNameOfInsuranceCompany" runat="server" CssClass="nor_txt1" Width="162px" Text="Name Of Insurance Company:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtNameOfInsuranceCompany" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator20" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Name Of Insurance Company is required" ControlToValidate="txtNameOfInsuranceCompany"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblRenewalDated" runat="server" CssClass="nor_txt1" Text="Renewal Dated:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><INPUT id="txtRenewalDated" class="text_box" readOnly type=text runat="server" /> <asp:Image id="Img6" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="RequiredFieldValidator11" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" ErrorMessage="Renewal Date is required" ControlToValidate="txtRenewalDated"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblExpiry" runat="server" CssClass="nor_txt1" Text="Expiry:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><INPUT id="txtExpiry" class="text_box" readOnly type=text runat="server" /> <asp:Image id="Image1" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="RequiredFieldValidator7" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" ErrorMessage="Expiry Date is required" ControlToValidate="txtExpiry"></asp:RequiredFieldValidator><BR /><asp:CompareValidator id="CompareValidator11" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" ErrorMessage="Expiry Date should be after Renewal Date" ControlToValidate="txtExpiry" Type="Date" Operator="GreaterThan" ControlToCompare="txtRenewalDated"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblPremiumAmount" runat="server" CssClass="nor_txt1" Text="Premium Amount:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtPremiumAmount" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator21" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Premium Amount is required" ControlToValidate="txtPremiumAmount"></asp:RequiredFieldValidator> <asp:CompareValidator id="CompareValidator9" runat="server" CssClass="nor_txt" Width="174px" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Premium Amount Should be Numeric" ControlToValidate="txtPremiumAmount" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblInsuredAmount" runat="server" CssClass="nor_txt1" Text="Insured Amount:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtInsuredAmount" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator22" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Insured Amount is required" ControlToValidate="txtInsuredAmount"></asp:RequiredFieldValidator> <asp:CompareValidator id="CompareValidator10" runat="server" CssClass="nor_txt" Width="176px" ValidationGroup="MotorInsurance" SetFocusOnError="True" ErrorMessage="Insured Amount Should be Numeric" ControlToValidate="txtInsuredAmount" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblAttachment2" runat="server" CssClass="nor_txt1" Text="Attachment :"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:FileUpload id="fuMotor" runat="server" CssClass="text_box"></asp:FileUpload> <asp:LinkButton id="lnkAttachMotor" onclick="lnkAttachMotor_Click" runat="server" CssClass="lnk_txt">View Uploaded Document</asp:LinkButton> </TD></TR><TR><TD style="WIDTH: 147px" align=left colSpan=1><asp:Label id="lblRemarksMotorInsurance" runat="server" CssClass="nor_txt1" Text="Remarks :"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtRemarksMotornsurance" runat="server" CssClass="text_box" TextMode="MultiLine" Rows="3"></asp:TextBox></TD></TR></TBODY></TABLE></TD></TR><TR><TD style="WIDTH: 100%; HEIGHT: 29px" vAlign=middle align=center colSpan=6><TABLE style="WIDTH: 100%"><TBODY><TR><TD style="TEXT-ALIGN: center" colSpan=2><asp:Button id="btnUpdateMotorInsurance" onclick="btnUpdateMotorInsurance_Click" runat="server" CssClass="form_button_large" Text="Update Motor Insurance" ValidationGroup="MotorInsurance"></asp:Button><asp:Button id="btnCloseMotorInsurance" runat="server" CausesValidation="false" CssClass="form_button" Text="Close" PostBackUrl="~/ViewDocument.aspx"></asp:Button></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></asp:Panel> </TD></TR><TR style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman"><TD style="WIDTH: 100%" vAlign=middle align=left colSpan=6><asp:Panel id="pnlOfficeInsurance" runat="server" Width="100%" Visible="false"><TABLE style="WIDTH: 100%" align=left><TBODY><TR><TD style="WIDTH: 100%" class="side_heading" vAlign=middle align=center colSpan=6><asp:Label id="lblOfficeInsurance" runat="server" Text="Office Insurance"></asp:Label></TD></TR><TR><TD style="WIDTH: 100%" vAlign=middle align=center colSpan=6><TABLE style="WIDTH: 100%"><TBODY><TR><TD style="WIDTH: 150px" align=left><asp:Label id="Label5" runat="server" CssClass="nor_txt1" Text="Location:"></asp:Label></TD><TD style="WIDTH: 459px" align=left><asp:DropDownList id="ddlLocationAddOfficeInsurance" runat="server" CssClass="text_box" AutoPostBack="True">
</asp:DropDownList></TD></TR><TR><TD style="WIDTH: 150px" align=left><asp:Label id="Label6" runat="server" CssClass="nor_txt1" Text="Policy No:"></asp:Label></TD><TD style="WIDTH: 429px; HEIGHT: 21px" align=left><asp:TextBox id="txtPolicyNoInsurance" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator23" runat="server" CssClass="nor_txt" ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Policy No. is required" ControlToValidate="txtPolicyNoInsurance"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 150px" align=left><asp:Label id="lblDateOfIssue" runat="server" CssClass="nor_txt1" Text="Date Of Issue:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><INPUT id="txtDateOfIssue" class="text_box" readOnly type=text runat="server" /> <asp:Image id="Img8" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="RequiredFieldValidator13" runat="server" CssClass="nor_txt" ValidationGroup="OfficeInsurance" ErrorMessage="Date of Issue is required" ControlToValidate="txtDateOfIssue"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 150px" align=left><asp:Label id="Label7" runat="server" CssClass="nor_txt1" Width="166px" Text="Name Of Insurance Company:"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtOfficeInsuranceCompany" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator24" runat="server" CssClass="nor_txt" ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Name Of Insurance Company is required" ControlToValidate="txtOfficeInsuranceCompany"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px" align=left><asp:Label id="lblNatureOfPolicy" runat="server" CssClass="nor_txt1" Text="Nature Of Policy:"></asp:Label></TD><TD style="WIDTH: 429px; HEIGHT: 22px" align=left><asp:TextBox id="txtNatureOfPolicy" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator25" runat="server" CssClass="nor_txt" ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Nature Of Policy is required" ControlToValidate="txtNatureOfPolicy"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px; TEXT-ALIGN: left" align=left><asp:Label id="lblExpiryDate" runat="server" CssClass="nor_txt1" Text="Expiry Date:"></asp:Label> </TD><TD style="WIDTH: 429px" id="txtExpiryDate" align=left><INPUT id="txtExpiryDate" class="text_box" readOnly type=text runat="server" /> <asp:Image id="Img9" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="RequiredFieldValidator12" runat="server" CssClass="nor_txt" ValidationGroup="MotorInsurance" ErrorMessage="Expiry Date is required" ControlToValidate="txtExpiryDate"></asp:RequiredFieldValidator><BR /><asp:CompareValidator id="CompareValidator14" runat="server" CssClass="nor_txt" ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Date of issue should be before Expairy Date" ControlToValidate="txtExpiryDate" Type="Date" Operator="GreaterThan" ControlToCompare="txtDateOfIssue"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 150px" align=left><asp:Label id="Label8" runat="server" CssClass="nor_txt1" Text="Insured Amount:"></asp:Label> </TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtOfficeInsuranceAmount" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator27" runat="server" CssClass="nor_txt" ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Premium Amount is required" ControlToValidate="txtOfficeInsuranceAmount"></asp:RequiredFieldValidator><BR /><asp:CompareValidator id="CompareValidator12" runat="server" CssClass="nor_txt" Width="174px" ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Premium Amount Should be Numeric" ControlToValidate="txtPremiumAmountOffice" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 150px" align=left><asp:Label id="Label9" runat="server" CssClass="nor_txt1" Text="Premium Amount:"></asp:Label> </TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtPremiumAmountOffice" runat="server" CssClass="text_box"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator28" runat="server" CssClass="nor_txt" ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Insured Amount is required" ControlToValidate="txtPremiumAmountOffice"></asp:RequiredFieldValidator> <BR /><asp:CompareValidator id="CompareValidator13" runat="server" CssClass="nor_txt" Width="176px" ValidationGroup="OfficeInsurance" SetFocusOnError="True" ErrorMessage="Insured Amount Should be Numeric" ControlToValidate="txtPremiumAmountOffice" Type="Double" Operator="DataTypeCheck"></asp:CompareValidator></TD></TR><TR><TD style="WIDTH: 150px; HEIGHT: 22px" align=left><asp:Label id="lblAttachment3" runat="server" CssClass="nor_txt1" Text="Attachment :"></asp:Label></TD><TD style="WIDTH: 429px; HEIGHT: 22px" align=left><asp:FileUpload id="fuOffice" runat="server" CssClass="text_box"></asp:FileUpload> <asp:LinkButton id="lnkAttachOffice" onclick="lnkAttachOffice_Click" runat="server" CssClass="lnk_txt" ValidationGroup="OfficeInsurance">View Uploaded Document</asp:LinkButton> </TD></TR><TR><TD style="WIDTH: 150px" align=left><asp:Label id="lblRemarksOfficeInsurance" runat="server" CssClass="nor_txt1" Text="Remarks :"></asp:Label></TD><TD style="WIDTH: 429px" align=left><asp:TextBox id="txtRemarksOfficeInsurance" runat="server" CssClass="text_box" TextMode="MultiLine" Rows="3"></asp:TextBox></TD></TR></TBODY></TABLE></TD></TR><TR><TD style="WIDTH: 100%" vAlign=middle align=center colSpan=6><TABLE style="WIDTH: 100%"><TBODY><TR><TD style="TEXT-ALIGN: center" colSpan=2><asp:Button id="btnUpdateOfficeInsuranceTemplate" onclick="btnUpdateOfficeInsuranceTemplate_Click" runat="server" CssClass="form_button_large" Text="Update Office Insurance" ValidationGroup="OfficeInsurance"></asp:Button><asp:Button id="btnCloseOfficeInsurance" runat="server" CausesValidation="false" CssClass="form_button" Text="Close" PostBackUrl="~/ViewDocument.aspx"></asp:Button></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></asp:Panel> </TD></TR><TR style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman"><TD style="WIDTH: 100%" vAlign=middle align=left colSpan=6><asp:Panel id="pnlAMC" runat="server" Width="100%" Visible="false" HorizontalAlign="Center"><TABLE style="WIDTH: 100%" align=left><TBODY><TR><TD style="WIDTH: 100%; HEIGHT: 17px; TEXT-ALIGN: center" class="side_heading" vAlign=middle align=center colSpan=6><asp:Label id="lblAMC" runat="server" Text="AMC"></asp:Label></TD></TR><TR><TD style="WIDTH: 100%; TEXT-ALIGN: center" vAlign=middle align=center colSpan=6><TABLE style="WIDTH: 100%"><TBODY><TR><TD style="WIDTH: 147px; HEIGHT: 22px" align=left><asp:Label id="lblVendorName" runat="server" CssClass="nor_txt1" Text="VendorName:"></asp:Label></TD><TD style="WIDTH: 460px; HEIGHT: 22px" align=left><asp:DropDownList id="ddlVendorName" runat="server" CssClass="text_box" AutoPostBack="True" OnSelectedIndexChanged="ddlVendorName_SelectedindexChanged">
<asp:ListItem>Vendor Name2</asp:ListItem>
<asp:ListItem>Vendor Name1</asp:ListItem>
</asp:DropDownList></TD></TR><TR><TD style="WIDTH: 147px" align=left><asp:Label id="Label11" runat="server" CssClass="nor_txt1" Text="Address:"></asp:Label></TD><TD style="WIDTH: 460px" align=left><asp:TextBox id="txtAMCAddress" runat="server" CssClass="text_box" TextMode="MultiLine" Rows="3"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator29" runat="server" CssClass="nor_txt" ValidationGroup="AMC" SetFocusOnError="True" ErrorMessage="Address is required" ControlToValidate="txtAMCAddress"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left><asp:Label id="lblPanTan" runat="server" CssClass="nor_txt1" Text="PAN/TAN:"></asp:Label></TD><TD style="WIDTH: 460px" align=left><asp:TextBox id="txtPanTan" runat="server" CssClass="text_box" ReadOnly="True"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator30" runat="server" CssClass="nor_txt" ValidationGroup="AMC" SetFocusOnError="True" ErrorMessage="PanTan is required" ControlToValidate="txtPanTan"></asp:RequiredFieldValidator></TD></TR><TR><TD style="WIDTH: 147px" align=left><asp:Label id="lblStartDate" runat="server" CssClass="nor_txt1" Text="Start Date:"></asp:Label></TD><TD style="WIDTH: 460px" align=left><asp:TextBox id="txtStartDate" runat="server" CssClass="text_box"></asp:TextBox> <asp:Image id="Img10" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="RequiredFieldValidator31" runat="server" CssClass="nor_txt" ValidationGroup="AMC" SetFocusOnError="True" ErrorMessage="Start Date is required" ControlToValidate="txtStartDate"></asp:RequiredFieldValidator> </TD></TR><TR><TD style="WIDTH: 147px" align=left><asp:Label id="lblEndDate" runat="server" CssClass="nor_txt1" Text="End Date:"></asp:Label></TD><TD style="WIDTH: 460px" align=left><asp:TextBox id="txtEndDate" runat="server" CssClass="text_box"></asp:TextBox> <asp:Image id="Img11" runat="server" Width="20" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="RequiredFieldValidator32" runat="server" CssClass="nor_txt" ValidationGroup="AMC" SetFocusOnError="True" ErrorMessage="End Date is required" ControlToValidate="txtEndDate"></asp:RequiredFieldValidator><BR /><asp:CompareValidator id="CompareValidator15" runat="server" CssClass="nor_txt" ValidationGroup="AMC" SetFocusOnError="True" ErrorMessage="Start Date should be before End Date" ControlToValidate="txtEndDate" Type="Date" Operator="GreaterThan" ControlToCompare="txtStartDate"></asp:CompareValidator></TD></TR><TR><TD style="HEIGHT: 21px; TEXT-ALIGN: center" align=left colSpan=2><asp:Button id="EditAddServiceSchedule" onclick="btnEditServiceSchedule_Click" runat="server" CssClass="form_button_large" Text="Add Service Schedule"></asp:Button></TD></TR><TR><TD style="HEIGHT: 235px" align=center colSpan=2><asp:Panel id="pnlServiceSchedule" runat="server" Width="100%"><BR /><asp:DataGrid id="gvwServiceSchedule" runat="server" CssClass="tebale_border" ForeColor="Black" Width="710px" Visible="False" OnItemCommand="gvwServiceSchedule_ItemCommand" GridLines="None" CellPadding="2" BorderWidth="1px" AutoGenerateColumns="False">
<FooterStyle BackColor="Tan"></FooterStyle
<SelectedItemStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite"></SelectedItemStyle
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center"></PagerStyle
<AlternatingItemStyle CssClass="alt_grid"></AlternatingItemStyle
<ItemStyle CssClass="nor_grid"></ItemStyle
<HeaderStyle CssClass="side_heading" HorizontalAlign="Center"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="SlNo" HeaderText="SlNo"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Service Date"><ItemTemplate>
<INPUT id="txtServiceDate" class="text_box" readOnly type=text value='<%# DataBinder.Eval(Container.DataItem,"Service Date") %>' runat="server" /> <asp:Image id="ImgDateGrid" runat="server" Width="20" __designer:wfdid="w95" ImageUrl="date_picker.jpg" ImageAlign="TextTop" Height="18"></asp:Image> <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" __designer:wfdid="w96" ValidationGroup="AMC" ErrorMessage="Service Date is mandatory" ControlToValidate="txtServiceDate">*</asp:RequiredFieldValidator>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:Button ID="btnDelete" runat="server" CausesValidation="false" CommandName="Remove"
CssClass="form_button" Text="Remove" />

</ItemTemplate
<HeaderStyle Width="100px"></HeaderStyle>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid> </asp:Panel> </TD></TR><TR><TD style="WIDTH: 147px" align=left><asp:Label id="lblAttachment4" runat="server" CssClass="nor_txt1" Text="Attachment :"></asp:Label></TD><TD style="WIDTH: 460px" align=left><asp:FileUpload id="fuAMC" runat="server" CssClass="text_box"></asp:FileUpload> <asp:LinkButton id="lnkAttachAMC" onclick="lnkAttachAMC_Click" runat="server" CssClass="lnk_txt">View Uploaded Document</asp:LinkButton> </TD></TR><TR><TD style="WIDTH: 147px" align=left><asp:Label id="lblRemarksAMC" runat="server" CssClass="nor_txt1" Text="Remarks :"></asp:Label></TD><TD style="WIDTH: 460px" align=left><asp:TextBox id="txtRemarksAMC" runat="server" CssClass="text_box" TextMode="MultiLine" Rows="3"></asp:TextBox></TD></TR><TR><TD style="WIDTH: 100%; TEXT-ALIGN: left" colSpan=2></TD></TR></TBODY></TABLE><TABLE style="WIDTH: 100%"><TBODY><TR><TD style="HEIGHT: 29px; TEXT-ALIGN: center" colSpan=2><asp:Button id="btnUpdateAMC" onclick="btnUpdateAMC_Click" runat="server" CssClass="form_button" Text="Update AMC" ValidationGroup="AMC"></asp:Button><asp:Button id="btnCloseAMC" runat="server" CausesValidation="false" CssClass="form_button" Text="Close" PostBackUrl="~/ViewDocument.aspx"></asp:Button></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></asp:Panel> </TD></TR></TBODY></TABLE>
</contenttemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Content>


Hi there

I also had the same problem. My File Upload control was not working properly in Update pannel.i was uploading multiple files and for this purpose i used different upload button which was in the same update pannel . i was using upload pannel in a tab container . and in each tab there was an update pannel. I simply removed that update pannel in which there was File Upload control. This thing posts back the whole pageSad. but uploads the file. If any one else has the solution then kindly share it.


Hi

An Ajax Alternative for FileUpload:

We've all embraced Ajax as a revolutionary technology, but many of us forget (or are not aware) of asynchronous posts in the times before XmlHttp requests. Our good old friend the IFrame used to be the preferred option for asynchronous http communications. Because an iframe is in essence it's own browser window, it can be used to fire off asynchronous requests (both POST and GET). However, even more important is an IFrame's ability to be a 'target' of a form POST. By adding an IFrame to the page and setting it as the target of the form post, you can in essence create an asynchronous file transfer.

For more help about Ajax Alternative for FileUpload, Please check: http://blogs.infragistics.com/blogs/tony_lombardo/archive/2007/04/09/file-uploads-where-s-the-ajax.aspx

A good example for you:http://forums.asp.net/t/1117746.aspx

NOTE:This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.