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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problems with FileUpload _only_ on a second page of wizard

Posted By:      Posted Date: September 12, 2010    Points: 0   Category :ASP.Net
 Hi, I have a wizard wrapped in UpdatePanel.  Second page of the wizard contains FileUpload.  I have a button on the page that causes a full post-back.  The weird thing is that the first post back triggered by the button results in empty FileName of FileUpload on the server side (HasFile is false).  The second and following clicks on the same button work as expected (i.e. FileUpload contains a valid FileName). Also, if I move the FileUpload control to the first wizard page then everything works fine. Could someone please let me know what might be causing this strange behaviour? Thanks. Sample code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestAjax.aspx.cs" Inherits="TestAjax" %><%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title></title></head><body>    <form id="form1" runat="server">    <div>          <asp:ToolkitScriptManager ID=&qu

View Complete Post

More Related Resource Links

Problems passing parameters to SSRS report from ASP.Net web page

I have a web page that displays some data.   When they click a submit button, I want to run a report.  But I would like to pass the start year/month and end year/month values that the user already entered on the web page to the report.  Here is what my url looks like when the report is displayed: http://xyzserver/Reports/Pages/Report.aspx?ItemPath=%2fReports%2fDevicesAllNew&rs:Command=Render&StartYYMM=201007&EndYYMM=201008 But my report displays the 2 textboxes for my StartYYMM and EndYYMM parameters as empty.  What am I doing wrong?  I did a google search and I saw something about using ReportServer instead of ReportManager.  I notice at the top of the browser when I run my report, it reads "Report Manager - Windows Internet Explorer".  Is this correct? Bob     Bob

Using Wizard To Pass Parameters From Page With No Buttons?

I'll start out by saying that I am kind of new to the Wizard control.  What drew me to it, was the fact I didn't need to pass variables between pages with the traditional methods.  Now I am faced with a situation where I may have to use those methods.On Step 2, I have a handful of LinkButtons that look similar to this... <asp:LinkButton ID="LinkButton113" CssClass="ListingItem" OnClick="boxChanger" runat="server" Text="Tree Services">Tree Services</asp:LinkButton> The sub boxChanger is this... Sub boxChanger(ByVal sender As Object, ByVal e As System.EventArgs) Dim s As LinkButton = CType(sender, LinkButton) Dim hd1 As HiddenField hd1 = CType(TemplatedWizardStep2.ContentTemplateContainer.FindControl("hdLinkItem"), HiddenField) hd1.Value = s.Text Wizard1.ActiveStepIndex = 2 End Sub I figured I could hide the item in a hidden field control before transfering over to the next page by changing the activestepindex.  That's not the case.  The first trip through the steps, I never retrieve the value in Step 3 from the hiddenfield.  However, if I called boxChanger to get to Step 3, use the previous button (buttons are visible on Step 3) to change index back to Step 2, then c

problems with page refresh

Ok here is the situation.I have an aspx page that 'ticks' using an ASP timer. In the code behind i have told the page that 'ontick' to redirect back to itself but with a different querystring value.The querystring values represent a base for the information (It is a sales page displaying monthly, quarterly and yearly values).The problem I have is that my backend code produces 2 graphs saved as BMP files. The problem I have is that these bmps do not update when the page ticks.All of the information does, but the images don't. I have so far attempted the following to try and irradicate the problemredirecting to another page, and then redirecting back immediately;using Response.Cache.SetCacheability(HttpCacheability.NoCache) in various (and multiple) placesusing html meta to stop caching.All has currently failed as the pictures do not update. I have tested the actual files themselves and they are updating. So it appears that the page is showing cached data rather than the new image.Any help to get my images to update will be greatly appreciated.Kind Regards

Problems with Master Page and content window

I have a master page whose primary function is to allow a user to search for a Credit Union.  They can either search by ID # or search by name.  With processing this page it will set session variables which in turn I would hope would be passed along to the content window. Within the content window I am displaying the information that will be needed on that particutlar page, if no record is found then it will allow them to add.  I also need it to clear the fields in the content window if they go from one record with data to one without.  Now if a user types in the ID#, then it doesn't seem to have any problems populating the content window.  The problem comes when they try and search by name.  If more then one record is returned then it will populate a listbox.  Which then I would like a user to select the name they are searching for and then populate the search boxes as well as process the content window. The problem I seem to be facing is the Page Load on the content window.  Session variables don't seem to be set in time for the content window to have the variable available to it. Hopefully you can help me out.Masterpage.master.vb Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'ResetValues() Me._txtCUName.Attributes.Add("onchange", "if(document

not retaining value of fileupload control in asp wizard control


I am developing a web application in asp.net and c#. I'm using an asp wizard control. there is  6 wizard steps in my wizard. In each phase im using many controls, so that many postback is done during execution.
I am using a asp fileupload control in second wizard step. My problem is that the value selected using fileupload control is not getting when i click wizard finsh button in the final step. values acquired using all other controls are available there.
Hope someone help me.
I just want to get the selected filename in last step. 

Problems refreshing parent page



I have a parent page which open a client page with window.open. In this client page I add a data entry. After that I want to refresh the parent page because there is ja list of entrys int the master page. This is the code:

ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RefreshParent", ";window.opener.document.forms(0).submit();", true);

The parent page refreshes but only the content and not the master. My data list is in an updatepanel of the master page.

problems with using jQuery for reordering groups on an ascx page


Hi all. im making a page that has its header, its footer, and its side menus all in seperate controls (ascx pages).  The reason is so i don't have to rewrite that code for every single page when only the inner content will be different.

In my Menu control there is a list of items that gets populated when the page loads from a database.  The items have an order in the database and i want to be able to reorder them by dragging and dropping.  I am using jQuery and the actual physical drag and drop is working but i am having trouble getting the new order to save in the database... atleast when it is on the ascx page.

It works when the menu is on the aspx page.

In my events.aspx page i have

<div id="contentLeft">
<asp:Repeater ID="FormGroupList" runat="server">           
        <li id="<%#Eval("FormGroupID")%>" class="itemStyle">                   
            <a class="active" href="fields.aspx?fg=<%#Eval("SectionHeading")%>"><%#Eval("SectionHeading")%></a></li>           

FileUpload redirect to login page


FileUpload works OK on my local site. When I moved my web application to a web host server, I tested to upload a file with this application, It's OK to upload file to the server before login. But after login, the FileUpload kept redirecting to login page without uploading. Any help? Thanks!

I have some problems creating a wizard in MVC


Hello! This is my first post here but i have read a lot of helpful threads before, so, thank you for all your answers :)
Now, I have a problem with an application. I want to create a Wizard using MVC. In this picture you can see the main structure:

Where is the "Farm Configuration Wizard" on the "Configuration Wizards" page of Central Administrati



Hi, All.

Now i am not finding the "Farm Configuration Wizard" on the "Configuration Wizards".

I disabled UAC on the server, and turn Internet Explorer ESC off.

And i run the Central administration as administrator.

but i can't find "Farm Configuration Wizard". The Configuration Wizards page is black.


Frankly, I need to add Active Directory user to sharepoint website.

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

A better way to reference your wizard steps using named steps

Note: this article uses the plain vanilla but the concepts apply equally well to its popular counterpart .

By far the most common way that I see wizard steps reference in code snippets is by their index.

Using jQuery to directly call ASP.NET AJAX page methods

Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

Top .NET Performance Problems and how to avoid them

Every time I work with one of our .NET customers to help them with managing their application performance I come across the same problems as seen with other clients before: lots of ADO.NET queries, many hidden exceptions in core or 3rd party .NET libraries, slow 3rd party components, inefficient custom code

Reduce ASP.NET Page size and complexity using JQuery

This is my first post on asp.net blog. ASP.NET Ajax and JQuery are two different ajax framework. In this post I will show, how we can enhance gridview using ASP.NET Ajax and JQuery. I also compare the implementation of these frameworks. In next posts i will explain more about JQuery and ASP.NET Ajax and also tell you "How to combine the power of both framework". My Future post will related to ASP.NET and related frameworks.
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