Click here to Skip to main content
15,913,263 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionSearcching Pin
dfsdsf4343418-Apr-10 20:59
dfsdsf4343418-Apr-10 20:59 
AnswerRe: Searcching Pin
Abhijit Jana18-Apr-10 21:14
professionalAbhijit Jana18-Apr-10 21:14 
AnswerRe: Searcching Pin
Sandesh M Patil18-Apr-10 23:02
Sandesh M Patil18-Apr-10 23:02 
QuestionImage url getting wrong Pin
Member 438775718-Apr-10 20:24
Member 438775718-Apr-10 20:24 
QuestionRegular Expression for link in vb.net label. Pin
Member 412548018-Apr-10 14:57
Member 412548018-Apr-10 14:57 
AnswerRe: Regular Expression for link in vb.net label. Pin
Not Active18-Apr-10 15:16
mentorNot Active18-Apr-10 15:16 
AnswerRe: Regular Expression for link in vb.net label. Pin
Member 412548018-Apr-10 17:26
Member 412548018-Apr-10 17:26 
QuestionHow to check email existence with asp.net Pin
Shahriar Iqbal Chowdhury/Galib18-Apr-10 9:15
professionalShahriar Iqbal Chowdhury/Galib18-Apr-10 9:15 
AnswerRe: How to check email existence with asp.net Pin
Not Active18-Apr-10 11:44
mentorNot Active18-Apr-10 11:44 
Questiontransferring files Pin
leone18-Apr-10 8:44
leone18-Apr-10 8:44 
AnswerRe: transferring files Pin
michaelschmitt18-Apr-10 10:42
michaelschmitt18-Apr-10 10:42 
AnswerRe: transferring files Pin
Michel Godfroid18-Apr-10 19:46
Michel Godfroid18-Apr-10 19:46 
QuestionRadGrid keeping textboxes in sync with bounddata column? Pin
Steve Holdorf18-Apr-10 8:27
Steve Holdorf18-Apr-10 8:27 
AnswerRe: RadGrid keeping textboxes in sync with bounddata column? Pin
daveyerwin18-Apr-10 8:35
daveyerwin18-Apr-10 8:35 
GeneralRe: RadGrid keeping textboxes in sync with bounddata column? Pin
Steve Holdorf18-Apr-10 9:13
Steve Holdorf18-Apr-10 9:13 
GeneralRe: RadGrid keeping textboxes in sync with bounddata column? Pin
daveyerwin18-Apr-10 12:49
daveyerwin18-Apr-10 12:49 
GeneralRe: RadGrid keeping textboxes in sync with bounddata column? Pin
Steve Holdorf18-Apr-10 13:15
Steve Holdorf18-Apr-10 13:15 
QuestionCan I Bind method to the control? Pin
marijus518-Apr-10 5:34
marijus518-Apr-10 5:34 
AnswerRe: Can I Bind method to the control? Pin
Brij18-Apr-10 6:20
mentorBrij18-Apr-10 6:20 
GeneralRe: Can I Bind method to the control? Pin
marijus518-Apr-10 7:18
marijus518-Apr-10 7:18 
GeneralRe: Can I Bind method to the control? Pin
Brij18-Apr-10 7:58
mentorBrij18-Apr-10 7:58 
QuestionIssue with WebToolBox.DatePicker... Pin
<<Tash18>>18-Apr-10 3:39
<<Tash18>>18-Apr-10 3:39 
AnswerRe: Issue with WebToolBox.DatePicker... Pin
Sandeep Mewara18-Apr-10 5:26
mveSandeep Mewara18-Apr-10 5:26 
QuestionForcing full postback in UpdatePanel Pin
paper6718-Apr-10 3:04
paper6718-Apr-10 3:04 
Hi,

I have basically the following structure set up :

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
   <asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" ... >
   :
   </asp:GridView>
   <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" ... >
   </asp:ObjectDataSource>
   <asp:ImageButton ID="NewInsertButton" runat="server" OnClick="NewInsertButton_Click" />
   <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource2" ... >
      <InsertItemTemplate>
         :
         <asp:FileUpload ID="FileUpload1" runat="server" />
         :
         <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Insert" />
      </InsertItemTemplate>
      :
   </asp:FormView>
   <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" ... >
   </asp:ObjectDataSource>
</ContentTemplate>
</asp:UpdatePanel>


I am aware that a FileUpload requires a full page postback. I read the article
http://www.4guysfromrolla.com/articles/090209-1.aspx[^]

I tried to install a PostBackTrigger programmatically to get a full postback only on the ImageButton1 control. All other postbacks must be partial. (GridView sorting, paging, ...)
In code behind I do :

protected void NewInsertButton_Click(object sender, ImageClickEventArgs e)
{
   FormView1.ChangeMode(FormViewMode.Insert);
   FormView1.DataBind();
   ImageButton InsertButton = FormView1.FindControl("ImageButton1") as ImageButton;
   if (InsertButton == null)
      throw new NullReferenceException("ImageButton1");
   ScriptManager Manager = ScriptManager.GetCurrent(Page);
   if (Manager == null)
      throw new NullReferenceException("ScriptManager");
   Manager.RegisterPostBackControl(InsertButton);
   :
}


The above code does not seem to install a full postback only for the ImageButton1, so the file upload fails. How can I make this work ?
AnswerRe: Forcing full postback in UpdatePanel [modified] Pin
daveyerwin18-Apr-10 4:42
daveyerwin18-Apr-10 4:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.