For the solution, I cannot use any event handling methods, because my webapp is fully ajax based and no complete postback is possible. So here's the problem.I have a `List<WebPage>` that contains a list of Links `(List<Link>)` and I need for all the links to bind repetitive information such as page title, id, url. Here is my current repeater.
in my asp.net_vb web there is a text box (textbox1) in which a date is dispalyed from database (eg 21-Mar-2012) in another text box (textbox2) i want to display
if the date is less than 30 Jun then the textbox2 should display 1 Jul+the year of textbox1
if the textbox1 date is greater than 30 Jun the text box2 should display 1 Dec + the year of textbox1
My website has a "charts" menu item that lets you choose from about a dozen pages each with a different chart in them. Each one of these pages uses the same nested master page which has some drop-down lists and text boxes to let the visitor do some filtering of what data shows up in the charts (I do this by building SQL statement parts in the nested master page and triggering an event that the chart page reacts to).
Anyway, One of the DropDownList controls shows the names of everyone in the Company (I use MembershipProvider and RoleProvider). What I want to is have the DropDownList show a different collection depending on the role that the visitor is in; If the visitor is in the "Principal" role, I want them to see everyone. If they are not in that role, I want them to get only their own name.
I expect I'd have to do this in code-behind... But thought I'd check to see if anyone knows if it is possible to have an "IF" statement in the SQL DataSource for this control that can refer to the role that the current logged-in user belongs to
I need to bind a List control based on the Gridview Row's datakeyName value while the Gridview control is being loaded into the page. I tried the following but it does not work.The BulletedList control is nested inside a Gridview Control and they both bound to an ObjectDataSource control. In my code, I passed teh UserID into the UserID parameter and call the Select() method but still does not work. Basically, I want to list of a user's hobbies, therefore the hobbies control are driven by the userID. tell me how can I get it to work?
protected void UserGridView_RowDataBound(object sender, GridViewRowEventArgs e) { int UserID;
I have a problem that is frustrating me to death. I am taking a date from a textbox and trying to see if the date has passed yet, but the datetime.compare function is giving me bad results when the date is today's date. Here is my code:
[Code]....
When I output to console, I get a value of "-1" even though the dates are exactly the same.
I added all that Addhours,minutes,seconds garbage to try to troubleshoot the problem, but I get the same result even without it.
I added a stoppoint and stepped through the code, and the date values it is comparing are identical, yet it gives me a value of -1 instead of 0.
I have a folder that cannot be accessed by anyone except the management role of my web site. But, I added a folder to this and it can be accessed by anyone.
Of course, I can explcitly set the access to only a specific role(s) but I would like to know if I can tell set it so that even folders nested inside a restricted folder can take on the same permissions settings as the folder in which it is nested.
I would like to add form authentication only on Admin folder.
when I add this into Admin/web.config
[Code]....
I'm getting this error:
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
on LinkButton a Modal popup is poping up will take few values from user and Its Add button will another Modal poup which has GridViews showing values taken from Previous Popup (Parent) with dummy table. and Finally child popup will save complete grid view in database.
and My issue is that Parent popup's Add button click event's code handler is not working
datetime.parseexact not working in windows 7. I have set Datetime Format using Control panel also change the Location and English (India) to English(USA)...but still not working...
I'm a novice programmer and I have this situation: I have a nested Gridview, and I want to be able to DELETE the records in the nested Gridview. I have no problem inserting new records with the nested gridview, but it does not execute the DELETE Command on the SQL Datasource. I checked that the DATAKEYNAME on the nested gridview includes the the parameter that is used in the DELETE SQL Command on the SQL Datasource for that Gridview. But it seems to me that the parameter value is not being passed to the SQL Datasource by the nested gridview. Maybe I need to use a difference approach to execute this on a nested gridview compared to a regular gridview.
I am working on a web application that resides on one server on a particular domain. The application needs to access files on another server controlled by a different domain. Is there some way I can access these files on the remote server? I have all logon credentials and authorized access, but I simply need to set the servers up to allow this.
I am building an ASP.NET 3.5 Web Application and I am NOT using the membership provider for security. In the application I have a role named Admin and all the files for this role are inside the Security folder in the project. Currently for all the pages inside the security folder I am checking to see if the logged in user's role is an Admin or not. This to me seems very redundant, can do something like "If the user is requesting a page inside the security folder then check his role".
Am displaying the contents of a folder(folders n files) in a gridview.In the gridview,file/foldername ,type ,size ,Last modified date columns are displayed.the datasource for this gridview is supplied manually through a datatable.
I need to display folder/file images beside folder/filename.if the datasource is from a database we can give a if condition in the following way.
[code]....
But here in itemtemplate I am binding the data using bind expression instead of Eval .So I could not give if condition here.
How can I display folder or file image based on a condition ?the datasource is provided manually to the gridview not from a database.
Can anyone tell me why the following nested Accordion control does not work?
[Code]....
The error I kept getting is this:
DataSource 'sql1980s' for control 'acd1980s' doesn't exist Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: DataSource 'sql1980s' for control 'acd1980s' doesn't exist Source Error:
I am loading a Usercontrol with another Updatepanel inside of it. Now in this usercontrol, i have a button which is registered as an async postback trigger for the 2nd Updatepanel. However when I click the button, nothing happens. While debugging, it does not even step into the Click event of the Button which sits in the usercontrol of course. The Parent Updatepanel ist set to Updatemode conditional and hildrenAsTriggers="false". The nested UpdatePanel2 is set to Updatemode=Conditional. I just want the Parent Updatepanel to do nothing and the button to fire its event so that I can load some data in the nested updatepanel.
I created a UserControl and added a public DateTime property. I want to set this property in Markup (ie. <cc1:MyControl runat="server" id="MyControl1" DateTimeProp="1/1/2010" /> ) however I live in a place with a dd/mm/yyyy date format so it complains if I set something like "20/1/2010". Is there a way to set markup in my local datetime format or do I have to conform to "mm/dd/yyyy"?
I have developed an application in ASP.NET 3.5 which utilizes the Membership and Roles Providers and Forms Authentication to manage user access and profiles.
There are various area's of this application that are only to be used by an admin users whom login using their email and password and the rest of the users log in using their telephone number and password via their iPhone.
For simplicities sake, I would like to have two different login pages, one that is formatted for the iPhone and performs the correct validation for users adding a telephone number and the other for the application administrators.
I want to redirect the user to their respective login page based on which folder they are attempting to access. For example say I have an application structure like this