View Complete Post
I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.
Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
' Get file name Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload) Dim UploadFileName As String = uploadAvatar.PostedFile.FileName If UploadFileName = "" Then ' There is no file selected args.IsValid = False Else Dim Extension As String = UploadFileName.Substring(UploadFileName.L
I am having problems with a user control. I want my solution to have a separate project for holding my user controls.
The main project can get a reference to this user control project and can import this user control dll into my main project.
Thanks in advance,
Here is the content page:
this is my aspx and cs code , let me know whether it is correct or not??
onload and performance on navigation of record show be good.
Plz help me
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True"
DisplayGroupTree="False" ReuseParameterValuesOnRefresh="true" HasToggleGroupTreeButton="False" Height="1039px" ReportSourceID="CrystalReportSource1"
<CR:CrystalReportSource ID="CrystalReportSource1" runat="
My web application has user control which uses third party controls called Devexpress controls. The user control is a menu and is part of the Master page. It is placed there because this needs to be available in all the pages. My user controls raises a even on item clicked. Now, My question is that Is there any way to know that the event has occurred in page_load of the current page in which I am in?
It should be simple; although I'm having a hard time to figure out the best way to do it. I've MVC2 pages with multiple forms on the same page having different functionalities.
What's the best way to handle this; including the MVC2 way of validation from the model?
I've read that if you put a validation control on a page it performs the validation on the client AND server side.
My question is, if you've got a button's click event and you put code in there that puts submitted data into a database, how will the validation controls stop the data being inserted?
Is validation simply performed before anything else, then the page just stops?
I have a dynamic accordion on a page. Set its datasource to an
object of paged data source.The user control is in the accordions
content template. When i was writing code the properties were showing
but after giving the values of databases as
but the values shows null, these properties are shown as textboxes text property by user control.
MoreOver when I checked the values of database Items.So i made a textbox instead of usercontrol here as
<asp:TextBox ID="txtTest" runat="server"
It is showing the correct value. And if i pass the value directly it is also showing correctly like
<uc:UserControl1 runat="server" Property1="XYZ")%>' Property2="ABC")%>' ></uc:UserControl1>
. where I am wrong
the problem is eval is not passing the value to usercont
Why do controls value not persist when returning to a page (e.g. via browser back button)? If I set control values without utilizing a post back the controls will maintain their last value when I return to the page. If I set a control value and then call a post back, the control value is reset to the default value when returning.
I have many pages with a gridview, and a textbox which is used to filter the gridview contents. I set the filter textbox, filter the gridview (postback), go to another page, and when I return to the gridview page (via back button), my filter textbox is reset empty, and the gridview is the original (unfiltered) data.
What concept am I missing here?
Thanks in advance...
I am working on a web form that displays the data from an access data source into a list view control. I need an advice on how to create , render a new page printer freindly .not buttons, controls,,, I have implemented a java script function to select which records I want to view in the printable page but I cannot came up with any idea on how to use this to create the printable help..
I am wondering if the Microsoft Report Viewer control allows for display changes. Say for instance a user wants would like to see all the data requested then another time would like to toggle thru the pages of infomation. So does anyone know if the control allows for display changes from complete view to paginated viewing. I am using MS VS 2008 with ASP.NET 3.0. Thanks for your response.