Combobox displays correctly only locally - c#

i have a serious problem.
I have a combobox in a webform. everything works fine locally. When the project is published i can't click on the combobox to display the various items. It more or less looks like a basic textbox....
This is my code:
<html>
<head>
<title></title>
<style id="Style1" type="text/css" runat="server">
td
{
vertical-align: top;
}
input.RadUploadSubmit
{
margin-top: 20px;
}
#RadUpload1
{
width: 355px;
}
</style>
<script type="text/javascript">
function CloseWindow() {
var oManager = GetRadWindowManager();
var oWnd = oManager.GetWindowByName("RadWindow1");
oWnd.Close();
}
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function CloseDialog() {
GetRadWindow().close();
return true;
}
</script>
</head>
<body>
<form runat="server" id="Form1">
<%--method="post" enctype="multipart/form-data"--%>
<div id="formulaire">
<center>
Ticket : <b>
<asp:Label ID="TicketFamille" runat="server"></asp:Label></b></center>
<asp:Label runat="server" ID="lblERROR" Visible="false"></asp:Label>
<table cellpadding="5px" cellspacing="2px">
<tr>
<td width="200px" align='right'>
<asp:Label ID="lblTitre" runat="server" Text="Titre"></asp:Label>
:
</td>
<td>
<telerik:RadTextBox ID="txtTitre" runat="server" Skin="Telerik" Width="250">
</telerik:RadTextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
ForeColor="Red" ControlToValidate="txtTitre" ValidationGroup="validationincident"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align='right'>
<asp:Label ID="lblCategorie" runat="server" Text="Concerne : "></asp:Label>
</td>
<td>
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AppendDataBoundItems="true"
OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Value="1">Projet</asp:ListItem>
<asp:ListItem Value="2">Sous-categorie</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td align='right'>
<asp:Label ID="lblSousCategorie" runat="server" Text="Sous Categorie :"></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="cbSousCategorie" runat="server" Skin="Telerik">
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td align='right'>
<asp:Label ID="lblProjet" runat="server" Text="Projet : "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="cbProjet" runat="server" DataTextField="nomProjet" DataValueField="idProjet"
Skin="Telerik">
</telerik:RadComboBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
ForeColor="Red" ControlToValidate="cbProjet" ValidationGroup="validationincident"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align='right'>
<asp:Label ID="lblDescription" runat="server" Text="Description : "></asp:Label>
</td>
<td>
<telerik:RadTextBox ID="txtDescription" runat="server" TextMode="MultiLine" Width="250"
Height="100" Skin="Telerik">
</telerik:RadTextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*"
ForeColor="Red" ControlToValidate="txtDescription" ValidationGroup="validationincident"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align='right'>
Joindre un fichier :
</td>
<td>
<br />
<telerik:RadUpload ID="RadUpload1" runat="server" MaxFileInputsCount="5" Skin="Telerik">
<Localization Add="Ajouter" Clear="Vider" Delete="Supprimer" Select="Parcourir" />
</telerik:RadUpload>
<br />
<asp:Repeater ID="reportResults" runat="server" Visible="False">
<HeaderTemplate>
Fichiers attachés:<br />
</HeaderTemplate>
<ItemTemplate>
'<%#DataBinder.Eval(Container.DataItem, "FileName")%>' ( '<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>'
)<br />
</ItemTemplate>
</asp:Repeater>
<%--<asp:Button ID="buttonSubmit" CssClass="RadUploadSubmit" OnClick="buttonSubmit_Click"
runat="server" Text="Joindre le fichier" />--%>
<br />
<%--<asp:Label ID="labelNoResults" runat="server" Visible="True">Pas de fichier joint pour le moment</asp:Label>--%>
<br />
</td>
</tr>
</table>
<asp:HiddenField runat="server" ID="HiddenFieldIdContact" />
<center><asp:Button ID="Button1" runat="server" Text="Soumettre ce ticket" OnClick="Button1_Click"
OnClientClick="if(Page_ClientValidate()) CloseDialog()" UseSubmitBehavior="false"
ValidationGroup="validationincident" /></center>
</div>
<center>
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
</center>
</form>
</body>
</html>
Thanks again for your help !!!

Have all the required DLL's or in your website BIN folder?
I think we have the same scenario, But I used Devexpress.
I don't know if is a bug on VS studio, but I have to manually add all the DLL's I used on my project BIN folder and upload it to production server.
Hope this help you!

It is possible that you have hit one of the famous ( won't fix :) ) IE limitations - 31 stylesheets per page and 4095 selectors per file.
http://blogs.telerik.com/aspnetmvcteam/posts/10-05-03/internet-explorer-css-limits.aspx
I'd recommend that you see if the problem exists in FF or Chrome.
Here you can find a test page, demonstrating the problem in IE.
http://demos.telerik.com/testcases/BrokenTheme.aspx
In the first case, you can try to combine the files as explained here:
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/custom-skin-asp-net-theme-ie-31-style-sheet-limit.aspx
This is just an assumption of course :) Normally, it is not easy to guess what happens in such scenario.

If your combo box works in dev, but not in production (or other environment), I think your problem is the data source.
you can confirm this by hardcoding the values for the combo box and seeing if it is then clickable in production.

Hello Dear Arnaud Adigard, if you code works fine locally then there show be a server problem where you are trying to deploy it. May be some file is missing or any other problem. It's generally not your cade problem because it's fine. :)

Check web config and make sure debug mode is False once it is deploy to IIS.
<compilation debug="false" strict="false" explicit="true">
<assemblies>
</assemblies>
</compilation>

Related

ASP.NET: UpdatePanel not displaying even when Visible set to True

I have two Update Panels in an aspx page and one ModalPopupExtender inside each of them. The problem I am facing is that, I have set the Visible property to false in the aspx page and set it to True when it needs to be displayed. But the UpdatePanel is not showing up even though I have set Visible=True property.
aspx code:
<%--Request closed --%>
<asp:UpdatePanel ID="udpModalReqClose" runat="server" Visible="false">
<ContentTemplate>
<div style="display:none">
<asp:Button ID="btnDummyButton_ReqClose" UseSubmitBehavior="true" runat="server" Text="DummyButton" Style="display: none;" />
</div>
<asp:Panel ID="pnlCloseReq" runat="server" BackColor="White" BorderStyle="Solid" BorderColor="Black" BorderWidth="1px">
<div>
<table id="Table24" runat="server" border="0" cellpadding="4" cellspacing="10" width="400px">
<tr>
<td align="center">
<asp:Label ID="lblcloseSuccessOPR" runat="server" Font-Bold="true" ForeColor="Red" />
</td>
</tr>
<tr>
<td style="height: 5px;"></td>
</tr>
<tr>
<td align="center">
<asp:Button ID="btn_okclose" runat="server" SkinID="btnSearch" CssClass="btnSearch" OnClick="btnPOCPIRedirect_Click"
CausesValidation="false" align="center" Text="OK" Width="65px" />
</td>
</tr>
<tr>
<td style="height: 5px;"></td>
</tr>
</table>
</div>
</asp:Panel>
<cc1:ModalPopupExtender ID="mpeClosedSuccess" runat="server" PopupControlID="pnlCloseReq" TargetControlID="btnDummyButton_ReqClose"
BackgroundCssClass="modalPopup1" DropShadow="true" BehaviorID="mpe">
</cc1:ModalPopupExtender>
</ContentTemplate>
</asp:UpdatePanel>
<%--Request declined --%>
<asp:UpdatePanel ID="udpModalReqDecline" runat="server" Visible="false">
<ContentTemplate>
<div style="display:none">
<asp:Button ID="btnDummyButton_ReqDecline" UseSubmitBehavior="true" runat="server" Text="DummyButton" Style="display: none;" />
</div>
<asp:Panel ID="pnlRequestDecline" runat="server" BackColor="White" BorderStyle="Solid" BorderColor="Black" BorderWidth="1px">
<div>
<table id="Table17" runat="server" border="0" cellpadding="4" cellspacing="10" width="400px">
<tr>
<td align="center">
<asp:Label ID="lblRequestDecline" runat="server" Font-Bold="true" ForeColor="Red" />
</td>
</tr>
<tr>
<td style="height: 5px;"></td>
</tr>
<tr>
<td align="center">
<asp:Button ID="Button4" runat="server" SkinID="btnSearch" CssClass="btnSearch" OnClick="btnPOCPIRedirect_Click"
CausesValidation="false" align="center" Text="OK" Width="65px" />
</td>
</tr>
<tr>
<td style="height: 5px;"></td>
</tr>
</table>
</div>
</asp:Panel>
<cc1:ModalPopupExtender ID="mpeRequestDecline" runat="server" PopupControlID="pnlRequestDecline" TargetControlID="btnDummyButton_ReqDecline"
BackgroundCssClass="modalPopup1" DropShadow="true" BehaviorID="mpe">
</cc1:ModalPopupExtender>
</ContentTemplate>
</asp:UpdatePanel>
Link buttons which triggers the modalpopup in aspx:
<ItemTemplate>
<asp:LinkButton ID="LinkButton3" OnClick="lnkCloseReleaseHL" runat="server"
Text="Close"></asp:LinkButton>
</ItemTemplate>
<asp:TemplateColumn HeaderText="Decline">
<ItemTemplate>
<asp:LinkButton ID="lnkDeclineHLRelease" runat="server" OnClick="lnkDeclineHLRelease_Click">Decline All</asp:LinkButton>
</ItemTemplate>
Code behind:
public void lnkCloseReleaseHL(object sender, System.EventArgs e)
{
udpModalReqClose.Visible = true;
string successMsg = "Request has been closed Succesfully.";
lblcloseSuccessOPR.Text = successMsg;
mpeClosedSuccess.Show();
}
protected void lnkDeclineHLRelease_Click(object sender, EventArgs e)
{
udpModalReqDecline.Visible = true;
string successMsg = "Request has been declined.";
lblRequestDecline.Text = successMsg;
mpeRequestDecline.Show();
}
If I do not set the Visible=False property in the aspx page, one of the ModalPopup is shown on the webpage, blank with the 'OK' button I have inserted in the popup.
Also, if I have just one UpdatePanel in my aspx page, the popup works perfectly fine without setting Visible property. Once I add another UpdatePanel below it, this problem occurs(screenshot in the link), where the panel with 'OK' button is displayed on page load.
Panel appearing on page with the 'OK' button
I tried searching for every possible solutions on the web but nothing has helped me. If someone can please guide me how I can resolve this, it would be of great help. I just want to know how I can make multiple UpdatePanels work without having this issue.
I'm not sure, but you can try using
style="display:none"
instead of
Visible="false"

Migrating a web form to web-form with Master

I have a web form up.
Later on, I realized I need a Master Page with a navigation that other web forms should follow.
I am in the process of manually migrating.
Taking this approach, Create Master Page -> Cut from web form -> Paste to web form with master -> erase the old web form.
As following. (I didn't create a navigation control yet, to not complicate the process further).
[New Master Page]
</asp:ContentPlaceHolder>
</div>
</form>
[Old Web Form]
<asp:EntityDataSource ID="entityDataSource" runat="server" ConnectionString="name=VideoLibraryEntities" DefaultContainerName="VideoLibraryEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="Clips" EntityTypeFilter="Clipo" OnSelecting="EntityDataSource_Selecting">
</asp:EntityDataSource>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="entityDataSource">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" />
</Columns>
</asp:GridView>
<div>
<h1>Sending Email</h1>
<table>
<tr>
<td>From:</td>
<td>
<asp:TextBox ID="txtFrom" runat="server" Width="250px"></asp:TextBox>
</td>
</tr>
<tr>
<td>From EMail:</td>
<td>
<asp:TextBox ID="txtFromEmail" runat="server" Width="250px"></asp:TextBox>
</td>
</tr>
<tr>
<td>To:</td>
<td>
<asp:TextBox ID="txtTo" runat="server" Width="250px"></asp:TextBox>
</td>
</tr>
<tr>
<td>To Email:</td>
<td>
<asp:TextBox ID="txtToEmail" runat="server" Width="250px"></asp:TextBox>
</td>
</tr>
<tr>
<td>Subject:</td>
<td>
<asp:TextBox ID="txtSubject" runat="server" Width="250px"></asp:TextBox>
</td>
</tr>
<tr>
<td>Message:</td>
<td>
<asp:TextBox ID="txtMessage" runat="server" TextMode="MultiLine" Height="138px"
Width="467px"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<asp:Button ID="btnSend" runat="server" Text="Send Email"
onclick="btnSend_Click" />
</td>
</tr>
</table>
<asp:Label ID="Label1" runat="server" ForeColor="Blue" />
</div>
</form>
Now shall I create a Master page with navigation and just paste the old web form into the new one?
Thanks.

Toggle visibility of specific elements in a ListView

I have a list view on a page and am trying emulate the toggling effect of a tree view. When first bound the detail elements (LBL_ActionTitle, LBL_Action, LBL_UrlTitle, LBL_Url) are set to visibility = false. I would like to have the click event of the element (LB_ExpandCollapse) toggle the visibility of detail elements directly related to it. IE not all the elements of that type on the page. I am not sure how to accomplish this, or if it can be done, and was hoping that someone could point me in the right direction. Here is the control for reference.
<div id="logContainer">
<asp:ListView ID=LV_Logs runat="server">
<LayoutTemplate>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tr>
<td></td>
<td style="width:85%" />
</tr>
<asp:PlaceHolder ID="itemPlaceholder" runat="server" />
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td>
<hr />
<asp:LinkButton ID="LB_ExpandCollapse" runat="server" CausesValidation="false" OnClick="expandCollapse_Click">+</asp:LinkButton>
<asp:Label ID="LBL_MessageType" runat="server" Text='<%# Eval("messageType") %>'></asp:Label>
<hr />
</td>
<td style="text-align: right">
<hr />
<asp:Label ID="LBL_Message" runat="server" Text='<%# Eval("messageTime") %>'></asp:Label>
<hr />
</td>
</tr>
<tr style="text-align: left">
<td style="padding-left: 65px">
<asp:Label ID="LBL_ActionTitle" Visibility="false" runat="server" Text="User Action:"></asp:Label>
</td>
<td style="padding-left: 10px">
<asp:Label ID="LBL_Action" Visibility="false" runat="server" Text='<%# Eval("action") %>'></asp:Label>
</td>
</tr>
<tr style="text-align: left">
<td style="padding-left: 65px">
<asp:Label ID="LBL_UrlTitle" Visibility="false" runat="server" Text="URL:"></asp:Label>
</td>
<td style="padding-left: 10px">
<asp:Label ID="LBL_Url" runat="server" Visibility="false" Text='<%# Eval("url") %>'></asp:Label>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
<asp:DataPager ID="DataPagerProducts" runat="server" PagedControlID="LV_Logs"
PageSize="20" OnPreRender="DataPagerProducts_PreRender">
<Fields>
<asp:NextPreviousPagerField ShowFirstPageButton="True" ShowNextPageButton="False" />
<asp:NumericPagerField />
<asp:NextPreviousPagerField ShowLastPageButton="True" ShowPreviousPageButton="False" />
</Fields>
</asp:DataPager>
I suggest you put the ID of the record as an ID on the TR containing the fields you want toggled. Then in your expandCollapseClick also pass the ID, so that you can set the row's style to display:block. Of course this assumes that all the rows start out at display:none. ie.
<tr id='<%# Eval("recordId") %>' style='display:none'>
and then in Javascript (pseudo-code)
function expandCollapseClick(row)
{
document.getElementById(row).style.display = 'block';
}
Then change your button to execute client-side as in:
<button onclick='expandCollapse(<%# Eval("recordId") %>)'>+</button>
This will call the code to display the row, passing in the id of the correct row. Of course this assumes that the table is fully populated when the page is retrieved and all you want to do is hide/show detail.

ValidatorCalloutExtender and ModalPopupExtender Issues on MasterPage

I have just created a website with a MasterPage. I have two conditions that will illustrate my problem:
Condition 1:
I have added a ModalPopupExtender on website.master. It has three fields and each field has a RequiredFieldValidator and a ValidatorCalloutExtender.
Condition 2:
I have a few different pages where you can click on a registration link. When you click the registration link, a registration form will appear. This form also has RequiredFieldValidators and ValidatorCalloutExtenders for each field.
Problem:
If I open a registration form and want to place my feedback, I click on the feedback button. The feedback modal popup displays. If I click on the submit button without filling the feedback form, it should give me the error in ValidatorCalloutExtender format on the ModalPopupExtender panel. However, it doesnt show me any error but the ValidatorCalloutExtender does show on the registation form along with respective validation.
<cc1:ModalPopupExtender CancelControlID="lnk_cancel" ID="popup_change_password" BackgroundCssClass="modalBackground"
runat="server" TargetControlID="ImageButton1" PopupControlID="panel_change_password">
</cc1:ModalPopupExtender>
<asp:Panel ID="panel_change_password" runat="server" Style="display: none; height: 400px;
width: 400px; padding-left:30px; background-repeat:no-repeat;" BackImageUrl="~/Images/background.gif">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="3" valign="top">
<table cellpadding="0" cellspacing="0" width="400px">
<tr>
<td align="right">
<asp:ImageButton ID="lnk_cancel" runat="server" ImageUrl="Images/close.gif" Height="30px"
Width="30px" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<asp:Label ID="lbl_new_password" runat="server" Text="Your feedback is important to us."
CssClass="login_font1"></asp:Label>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td>
<asp:Label ID="lbl_name" runat="server" Text="Name" CssClass="Label_Styles"></asp:Label>
</td>
<td>
:
</td>
<td>
<asp:TextBox ID="txt_name" runat="server" CssClass="Textbox_Styles"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td>
<asp:Label ID="lbl_email" runat="server" Text="Email Address" CssClass="Label_Styles"></asp:Label>
</td>
<td>
:
</td>
<td>
<asp:TextBox ID="txt_email" runat="server" CssClass="Textbox_Styles"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td>
<asp:Label ID="lbl_comment" runat="server" Text="Comments" CssClass="Label_Styles"></asp:Label>
</td>
<td>
:
</td>
<td>
<asp:TextBox ID="txt_comment" runat="server" CssClass="Textbox_Styles" Height="120px"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
</table>
</asp:Panel>
Put the above code in an UpdatePanel with UpdateMode="Conditional" and ChildrenAsTriggers="False".
So it will look something like :
<asp:UpdatePanel ID="sbsModalExtenderUpdatePanel" runat="server" UpdateMode="Conditional"
Visible="False" ChildrenAsTriggers="False">
<ContentTemplate>
<asp:Panel ID="StepByStepBookingPanel" runat="server" Enabled="false" EnableViewState="false"
Style="display: block" CssClass="mediumModalPopup" ScrollBars="Auto" Width="800px"
Height="300px" ViewStateMode="Enabled">
<div id="clientCoordDiv" runat="server">
<table id="StepByStepTable" runat="server">
etc...
</table>
</div>
</asp:Panel>
<ajax:ModalPopupExtender ID="mpeStepByStepBooking" runat="server" BackgroundCssClass="modalBackground"
PopupControlID="StepByStepBookingPanel" CancelControlID="BtnCancel" OnCancelScript="ClearStepByStepPopup"
TargetControlID="hdnStepByStepButton" DropShadow="true" BehaviorID="modalwithinput" />
<asp:CompareValidator ID="ClientCoordinatorCompareValidator" runat="server" ErrorMessage="Please select a Client Coordinator"
ControlToValidate="ddlClientCoordinator" Display="None" Operator="NotEqual" SetFocusOnError="True"
Type="Integer" ValueToCompare="0" ValidationGroup="SelectionRequired">
</asp:CompareValidator>
<asp:CompareValidator ID="CVOCoordinatorCompareValidator" runat="server" ErrorMessage="Please select a CVO Coordinator"
ControlToValidate="ddlCVOCoordinator" Display="None" Operator="NotEqual" ValueToCompare="0"
Type="Integer" SetFocusOnError="True" ValidationGroup="SelectionRequired">
</asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="CompareClientCoordinatorExt" runat="server" Enabled="True"
TargetControlID="ClientCoordinatorCompareValidator" BehaviorID="ClientValidatorExt">
</ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="CVOCoordinatorCompareValidatorExt" BehaviorID="CVOValidatorExt"
runat="server" Enabled="True" TargetControlID="CVOCoordinatorCompareValidator">
</ajax:ValidatorCalloutExtender>
</ContentTemplate>
</asp:UpdatePanel>
This will keep the dialog up while you validate it. Unfortunately, I do not have the full solution since my validator messages are not displaying. So far, from what I am getting on the Net it is a problem with the Ajax library. Ugly!
Oh well, hope this helps someone...

FileUpload not working in update panel(modal popup extender)

i am developing web application and contain modal popup extender in which update panel made and it contain file upload control but file upload control not working in it.
This is my modal popup which contain fileupload control
and my modal popup source code
<cc1:ModalPopupExtender ID="AddNews" runat="server" PopupControlID="pnlPopUp1" BehaviorID="AddNews"
TargetControlID="btnNews" BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
<asp:Panel ID="pnlPopUp1" runat="server" CssClass="modalPopup" Height="450px" Width="660px"
Style="display:none; z-index: 100000">
<asp:UpdatePanel ID="Upanel1" runat="server">
<ContentTemplate>
<div>
<table cellpadding="0" cellspacing="0" width="100%">
<tr style="height: 35px;">
<td style="width:170px">
</td>
<td style="text-align: center">
<h1>
Add News</h1>
</td>
<td style="text-align: right">
<asp:ImageButton ID="ImageButton2" AlternateText="Close Image" runat="server" ImageUrl="~/images/delete_32i.GIF"
OnClientClick="return closePopup('News')" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="lblAddNewsError" runat="server" Text="" ForeColor="Red"></asp:Label>
</td>
</tr>
<tr>
<td>News Title:</td><td>
<asp:TextBox ID="txtNewTitle" Width="250px" runat="server" MaxLength="500"></asp:TextBox>
</td><td>
<asp:RequiredFieldValidator ID="rfvNewsTitle" runat="server"
ControlToValidate="txtNewTitle" ErrorMessage="*" ToolTip="Enter news title"
ValidationGroup="AddNews"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Upload News Video</td><td>
<asp:FileUpload ID="FileUpload1" runat="server" />
</td><td><asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="FileUpload1"
ErrorMessage="Invalid video File"
ValidationExpression="^([0-9a-zA-Z_\-~ :\\])+(.avi|.AVI|.wmv|.WMV|.flv|.FLV|.mpg|.MPG|.mp4|.MP4)$"
ToolTip="Only allow avi, wmv, flv, mpg, mp4 formats video files"
ValidationGroup="AddNews"></asp:RegularExpressionValidator></td>
</tr>
<tr style="height: 5px">
<td>
</td>
</tr>
</table>
<div>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="width: 675px">
<FCKeditorV2:FCKeditor ID="FCKAddNewsContent" basepath="~/fckeditor/" runat="server" Height="300px"></FCKeditorV2:FCKeditor>
</td>
<td valign="top">
</td>
</tr>
<tr>
<td style="text-align:right">
<asp:Button ID="btnAddNews" runat="server" Text="Add News"
onclick="btnAddNews_Click" ValidationGroup="AddNews" />
<asp:Button ID="btnClose"
runat="server" Text="Close" OnClientClick="return closePopup('News')"
CausesValidation="False" /></td><td></td>
</tr>
</table>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnAddNews" />
</Triggers>
</asp:UpdatePanel>
</asp:Panel>
as you see my one button also mentioned in postback trigger as i click on this button the result which i got is
can anyone help me out from this problem.
only one thing i just need in web.config and make it working
<httpRuntime executionTimeout="90" maxRequestLength="2000000" useFullyQualifiedRedirectUrl="false" requestLengthDiskThreshold="8192"/>
Point up my answer if you got your solution.
You can set Triggers on update panel. After that you can get file at server side.
<Triggers>
<ajax:PostBackTrigger ControlID="btnAddNews" />
</Triggers>
Hope it will help.

Categories