.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Asad Ali
Post New Web Links

load down down box from aspx.cs

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net
 

I have the following code in my aspx file

<asp:DropDownList id="lstBannerType" runat="server" CssClass="input_nosize" AutoPostBack="True" OnSelectedIndexChanged="lstBannerType_SelectedIndexChanged">
      <asp:ListItem>Top banner</asp:ListItem>
      <asp:ListItem>Tower banner</asp:ListItem>
      <asp:ListItem>Sector banner</asp:ListItem>
      <asp:ListItem>Job of the week</asp:ListItem>
      <asp:ListItem>Recruiter of the week</asp:ListItem>
      <asp:ListItem>JBE sponsorship</asp:ListItem>
      <asp:ListItem>Working Abroad</asp:ListItem>
  </asp:DropDownList>

but want to change this so it loads in my aspx.cs page so I can wrap it in an id (!IsPostBack) statement to stop the value getting set back to Top banner when the page is refreshed can anyone help

  




View Complete Post


More Related Resource Links

Call DLL Methods from outside the project / Load Dynamic WPF in aspx

  

Dear All Experts,

for my project, i created a solution with a one aspx page and all of other components are Dynamic load WebUserControls ascx, each user control and related functions are a separate webapplication project.

now i need to use WPF with my project, i dont know how to load the ".xbap" file Dynamically in my page,

also when i tried to use it as iframe, i face the error "System.Security.SecurityException: That assembly does not allow partially trusted callers" which means that i cannot call or use any of my DLL's methods from outside the project invironment (please note that i am not using strong names anywhere), i put [assembly: AllowPartiallyTrustedCallers]  attribute in AssemblyInfo.cs but also i cannot call required functions.

now the questions is:

1. can i associate with WPF (*.xdap) files and load it the same as dynamics user controls?

2. how to call and let my functions work outside the project invironment.

thanks.


Call DLL Methods from outside the project / Load Dynamic WPF in aspx

  

Dear All Experts,

for my project, i created a solution with a one aspx page and all of other components are Dynamic load WebUserControls ascx, each user control and related functions are a separate webapplication project.

now i need to use WPF with my project, i dont know how to load the ".xbap" file Dynamically in my page,

also when i tried to use it as iframe, i face the error "System.Security.SecurityException: That assembly does not allow partially trusted callers" which means that i cannot call or use any of my DLL's methods from outside the project invironment (please note that i am not using strong names anywhere), i put [assembly: AllowPartiallyTrustedCallers]  attribute in AssemblyInfo.cs but also i cannot call required functions.

now the questions is:

1. can i associate with WPF (*.xdap) files and load it the same as dynamics user controls?

2. how to call and let my functions work outside the project invironment.

thanks.


How to load the custom autoincrement value in Newform.aspx

  
Hi, I have a List to get the Customer Information, in that i have a column to increment, the increment value is in the combination of Date,String,and ID of the currenitem (10-28-SSS23). How can i achive this auto increment value. So that when a user click the new menu he will redirect to 'NewForm.aspx' and in the page load i want to load the autoincrement value to the textbox.

Load Previous ASPX Page while click on Javascript History.Back

  

Hi All,

I am stuck with a unusual Scenario, I have Default.aspx page which contains a Search criteria option and Gridview, After doing particular search result is displayed in Gridview .

When i click on selectedindexchanged event of Gridview it takes me to another page called Details.aspx where there is form in edit mode where the user can update and save the data into a database . In Details.aspx page i have link button which have history.back function which takes me to default.aspx page where i can retain my Search criteria and Gridview Result but my query is when click on Link button i want to call any of the Events of Default.aspx page.


Thanks in Advance

Shabbir




Content sources page (layouts/listcontentsources.aspx) takes 10 minutes to load or fails with 'Unkn

  
Ever since this weekend we cannot normally access the Search Content sources page. It takes ages to load and sometime fails with "Unknown error". Also, we have incremental crawls on all our content sources that are stuck for ~30 hours now. Restarting search services didn't help. There's almost no activity on our search server. May have something to do with backup software on the search server but we uninstalled it completely now.

MOSS2007, latest SP's, clustered farm, 2 * FWS, 2 * SQL, separate index server

Any clues?

Thanks

Can not load SSRS report on aspx page

  

I have a SSRS report that I am supposed to show on an aspx page. I wrote the following code and passed all the parameters to the report. When I load this page I see a Loading progress bar that goes on and on, but it never loads. I am getting no errors at this stage.

Please suggest what is missing?

<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

    <form id="Form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
      <table>
        <tr>
        <td>
        <rsweb:ReportViewer ID="ReportViewer1" runat="server" width="100%" height="95%" ></rsweb:ReportViewer>             
        </td>
        </tr>
      </table>
      </form>

protected void Page_Load(object sender, EventArgs e)
    {
        
        List<ReportParameter> Params = new List<ReportParameter>();
        ReportParameter param = new ReportParameter("CaseNo", "THC11-002665");
        Params.Add(param);
        param = new ReportParameter("DraftWatermark", "False");
        Para

Combine, minify and compress JavaScript files to load ASP.NET pages faster

  
Websites are getting more interactive these days and most of this interactivity comes from JavaScript. People are using different JavaScript libraries and frameworks to make their websites more interactive and user friendly.

DataTable - Load from IDataReader - CreateDataReader - ReadXml WriteXml - Free ADO.NET Tutorials

  
The DataTable in ADO.NET 2.0 has been seriously beefed up and I absolutely love it. Not everything we consume deals with multiple resultsets and requires the ever popular DataSet. With the cool new features in the ADO.NET 2.0 DataTable, we can get many of the cool features in the DataSet without all the extra baggage and memory footprint particular to multiple resultsets.

Load DataTable from IDataReader

ActiveSync 4.5 (Free Down Load) using in Windows Mobile Pocket Pc

  
Microsoft ActiveSync 4.5 is the latest sync software release for Windows Mobile-powered devices. ActiveSync provides a great synchronization experience with Windows®-powered PCs and Microsoft Outlook right out of the box.

Features:

* Faster file transfer speed and photo sync via Outlook are only available for Windows Mobile 5.0 powered devices.
* Remote PC Sync (via WiFi or LAN) has been removed due to Enterprise customer feedback around security issues.
* Customers using Microsoft Exchange 2003 Service Pack 2 with devices running the Messaging and Security Feature Pack for Windows Mobile 5.0 will benefit from the following feature enhancements included in ActiveSync 4.5: Direct Push Technology, local device wipe, and certificate powered authentication to Microsoft Exchange.
* Microsoft® Outlook® 2000 is not supported by ActiveSync 4.5. It is highly recommended that users upgrade to Microsoft® Outlook® 2003 messaging and collaboration client.
* Conversion of database files for use on a mobile device is not supported by ActiveSync 4.5. On previous versions, this feature was limited to devices running Windows Mobile software for Pocket PC 2003 and earlier.
* Conversion of font files for use on a mobile device is not supported by ActiveSync 4.5. On previous versions, this feature was limited to devices running Windows Mobile software for Pocket P

Code works on aspx but not ascx

  

Not sure which category to put this question in, so I will put it in here.

Just to give you an idea of the layout of my solution, I have the main project, along with 2 class libraries, BLL and DAL.  (Business Logic Layer and Data Access Layer)

The BLL refers to the DAL and the main project refers to the BLL.


I had a test website and the code worked fine, but the same code will not work on the real project. The only difference is that in the test project, the code was on an aspx code behind, whereas in the real project, it is an ascx code behind (Web User Control )

The code is:

Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString
        Dim recordEntry As New UserRecord(connectionString)
        recordEntry.UserName = "TestName"
        recordEntry.BMI = bMI
        recordEntry.BMR = bMR
        recordEntry.FTM = fTM
        recordEntry.TDEE = tDEE
        recordEntry.TodayDate = dateForToday
        recordEntry.InsertRecord()



Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString

Create an API (aspx vs mvc)

  

Hi everybody!

I'm not sure if this is the right place to ask this, so, sorry if it's not. I have to create a web application. I can handle that. But, it has a requirement I've never done before. I need to create an API for that application, so other apps can get or set information from/to my webapp.

I've been searching a lot and still don't have a starting point. Seems that MVC is really good to do that, but I'm not familiar with MVC, so I would need a starting point. I was thinking to do it in aspx (Framework 4), but do not know how to do that with aspx either.

Can anyone help me to get started with this?

Thanks in advance


Launch CMD File From ASPX Page

  

My organization uses a CMD file to install updated files for a major enterprise application. Currently, we send out an email to users with a link to the file and instructions to run it, BUT inevitably users don't update their machines until their in field and try to start the app.

 

We're now liking the idea of using an ASPX page to prompt the users to run the updates and to capture the fact that the updates have been run. I realize that we can't capture the success or failure of the update. But we'd like to capture the user accessed the page.

 

Is it possible to embed into the markup for the page a link to the file on the local intranet that the users can click on to run the file?

The user accessing the page would capture that they did just that. We'd deal with wether or not the update was actually installed or if it failed later with them directly.


website load testing

  

How can i check "load testing" on my site (its using vb.net and SQL server)? Any free tool available or can it be done through windows server IIS?




Custom views on .aspx webpage

  

Hi again, i have a client that needs me to create a custom view on thier webpage similar to Microsoft Word.

It goes about that, when I click on an image it redirects me to another page and must create a custom view for a certain paragraph on that page. I am not sure how to do this and wonder if anyone knows how.

I am using C# programming language if that helps at all. I Heard that using javascript would work but i dont know javascript yet so is there any alternative?


Open ModalPopup dialog on page load

  

Is there a way to make a modal popup panel active on page load so that the user can't do anything until they deal with the popup dialog?


JQuery Treeview plugin is not working with Ajax page load in ie8

  

Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.


Any idea?

Thanks in advance.



Visual Studio closes itself by opening aspx-Page designer after Windows Update

  

Hey Guys,

I've a problem with my Visual Studio.

On the 13th of August 2010 i installed a Windows update on my vista sp2 pc. For this date my Visual Studio 2008 sp 1 always has closed itself by opening an aspx-page in designer view. There is no error message just closing the window. I restored a backup of my windows from the time before updating it and it helped, i could open aspx pages in the design view till the update has been installed again automatically after rebooting the pc. I can't disable windows updates, cause it's my pc at work and safety is very important. I hope you could help me out of this disaster.


Thanks

Nik


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend