Web Forms :: Identifying Cause Of Postback?

Oct 29, 2010

Say I have a single page/form with a search facility (i.e. a textbox plus 'Go' button) and a login facility (username, password and 'Login' button).

Is it possible to identify within the Page_Load event which button the user has clicked - i.e. 'Go' or 'Login' - can I somehow use the 'Source' and/or 'e' parameters to identify this?

I can direct both buttons to different OnClick event handlers or direct both to the same handler and identify the button using the Id or text properties but I'm curious to know whether the button can be identified at the Load stage.

View 4 Replies


Similar Messages:

Web Forms :: Identifying Browser Back Button And New Tab?

May 10, 2010

How to recognize if user has come through browser back button in asp. net site

AS well how to identify if they have opened new tab in the same browser.

View 1 Replies

Web Forms :: Identifying Which Button Is Clicked In A WebPart?

Feb 8, 2010

In a WebPart class, I have one label and two buttons. When a button is clicked, I would like the label to identify the clicked button.

I have the code:

Private Sub TestWebPartClass_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.PreRender
Dim Label1 As New Label()
Dim Button1 As New Button()
Dim Button2 As New Button()

[Code]....

How do I now add (in VB please) the event handlers so that, when a button is clicked, Label1 identifies the clicked button.

View 2 Replies

.net - Identifying The Aggregate Roots?

Mar 9, 2011

Let us assume the following relationships (diagram). A FundCompany has Funds, and Accounts. There is also a FundAccount which creates a many-to-many relationship (as well as other attributes at the relationship level) between Accounts and Funds. Lastly an Account has one or more Beneficiary.The FundCompany is an aggregate root as it's at the top of the pyramid. Neither Account nor Fund can exist without the FundCompany. FundAccount cannot exist without both Fund and Account; does that make them both aggregate roots? Or is Fund still the only aggregate root, having to go through it to perform operations on FundAccount entities? The fact that the Account also has Beneficiaries, which cannot exist without the Account, does that also signal Account being an aggregate root?

All of the entities on this diagram will require CRUD operations and screens in my application. The reason I'm bringing this is up is most often every UI screen will store the ID of the row/entity it's referencing. So for example a user clicks "Details" on a table with Funds, I might need to retrieve a fund via its ID. My understanding is that if an entity needs direct access then it's an aggregate root in itself. However this would make a lot of entities aggregate roots by default.Based on the answers to above questions I have to map these operations to the proper aggregate root's repository.

View 1 Replies

AJAX :: Identifying A Namespace Used For 'slideShow'?

Jan 21, 2011

I'm using Visual Web Developer 2008 Express Edition, coding in C#. I think that the framework that I am aiming for is 2.0.

I am working on some old projects here where I work. However, I do not have access, nor do I know what the original programmer used to write this code.

The following code gives me an error:

[Code]....

(note that SlideList is an ArrayList that is being assigned to a DataSource. Also, this code is found inside a function named "CreateFeaturedSlideShow", which is called by the function "Page_Load" in "default.aspx.cs")

When I try to compile the project I get this error code: "The type or namespace name 'slideShow' could not be found (are you missing a using directive or an assembly reference?)"

When I comment out the code, the project compiles. However, when I try to run it, I get another error message: "Only one of AdvertisementFile, DataSource, or DataSourceID properties can be set on AdRotator 'AdRotator1'. "

From examing the rest of the code, it seems like this part of the project is populating a database with advertisement data, and selecting an ad at random, and keeping track of various statistics.

My problem is that I am having difficulty locating anything that will give me a slideShow namespace. The top result seems to be the SlideShow Extender, but after adding this toolkit to my toolbox nothing changed, which leads me to believe that I have something else.

Does anybody know where I can find this 'slideShow' that is referred to in the code?

View 2 Replies

SQL Server :: Not Identifying Quote When Executing Query?

Sep 30, 2010

Im using SQL Server 2008 R2, Server version 9.0 SP3Im trying to do a replace on a comma seperated values before submitting to the "IN" condition.

[Code]....

[Code]....

View 2 Replies

Visual Studio :: Identifying Unused Properties In The Project?

Feb 17, 2010

i am working on asp.net application using C#, identifying properties that are unused in my project. in Code analysis tool i am able to see unused private fields getting reported (Avoid unused private fields), but is there any such facility too for unused Properties declared in the class.

View 3 Replies

Security :: Identifying Users Uniquely Via A Guid Or Other Techniques?

Oct 14, 2010

I am in the process of building a survey using asp.net and store these results into a database. Now this is what I am trying to achieve: - The survey is fairly long but will be split up in sections. - the way I have been told to develop this is to save each section into the database when the user clicks on a next button for example rather than clicking a final submit button and then submitting the results all in one go to the database. The reason being is for example, the user's browser crashes etc or if they accidentally close it down. I need to build it such a way that survey can remember who the person is.

I can't use windows authentication as it will be externally based, is there anyway I can uniquely identify people when they arrive on the web application e.g. by using a guid? Can it be guaranteed that the person who arrives on the application with a guid on that machine be exactly the same when he/she arrives again?

View 2 Replies

DataSource Controls :: Identifying Duplicates In Data Upload?

Mar 3, 2011

Using SQL server and C# to build my web site. I need to do a bulk upload Employee data from Excel to SQL.

I use the following code to perform this. The code works fine.

[Code]....

In the Employee table there is a field called ID which is of type int and auto incrememntral . This is the primary key.

There cannot be duplicates in the combination of EmployeeName and Location. If the user tries to upload ( through the Excel file) the combination of EmployeeName and Location which is there in the database, I need to flag it.

How can I identify the duplicates in an easy way rather than going through all the records again and again? Any functaion in SQL I can use to identify the duplicates?

View 4 Replies

Web Forms :: Click Event Does Not Fire On Postback, But Only On Second Postback

Nov 17, 2010

On my page: a Button1, a ListView1, a Panel1 and inside Panel1 an ImageButton1In the ListView1_PreRender-Event the property Panel1.Visible = false or Panel1.Visible = true is set.1. After first loading of the Page Panel.Visible = false ist set in ListView1_PreRender.2. After the postback click on Button1 the criteria for the visibility of Panel1 are evaluated, thus setting in the ListView_PreRender Panel.Visible = true.

View 3 Replies

Web Forms :: Cancel Button PostBack Event During PostBack

Mar 10, 2011

I have a script that runs during the Page_Load() event which checks a database table to make sure that the user is still owns the lock on the page. If they no longer own the lock, I disable all the controls on the page and display an
error message.My thinking was that by disabling all controls during Page_Load() I could prevent any PostBack events from occuring. For example, I have a button on the page called "Save and Quit"

View 2 Replies

Forms Data Controls ::Postback Of Page Using JavaScript Postback's Slow Down The Page?

Sep 22, 2010

I'm at my wits end on this one looked/Searched/Played/Experimented and I need your help if you can.This page is going to be primarily used on a mobile device using Win Mobile 5 Need to Accomplish:Prevent Postback(serverside) of Page using JavaScript (Postback's slow down the page on mobile device)

[code]...

View 1 Replies

How To Prevent Master Page Postback When Update Panel Asynchronous Postback Happened

Oct 15, 2010

When an asynchronous postback happened inside update panel, another postback happens also for MasterPage not only update panel embedded page .

I want to prevent this MasterPage postback .

is this possible ? think like i have a MasterPage

and another page which is test.aspx which is content page of MasterPage

i have update panel at test.aspx

when asynchronous postback happens at this test.aspx update panel it also loads MasterPage Page_Load

i want to prevent this (it should not also load MasterPage Page_Load)

View 2 Replies

Textbox Always Trigger Postback Event With Autopostback - Stop Postback By Enter Key?

Jun 8, 2010

I have 2 textboxes and a submit button inside a .net composite server control. I tried to only postback when submit button is clicked. I set autopostback = false for both textboxes. But either one still trigger submit button's onclick event by hitting "Enter" inside textbox. How can I stop postback by enter key?

View 2 Replies

AJAX :: How To Prevent Master Page Postback When Update Panel Asynchronous Postback Happened

Oct 15, 2010

When an asynchronous postback happened inside update panel, another postback happens also for MasterPagenot only update panel embedded page .I want to prevent this MasterPage postback . is this possible ?think like i have a MasterPage and another page which is test.aspx which is content page of MasterPagei have update panel at test.aspxwhen asynchronous postback happens at this test.aspx update panel it also loads
MasterPage Page_Loadi want to prevent this (it should not also load MasterPage Page_Load)

View 3 Replies

JQuery :: Uframe Postback Button Control Getting Postback The Page Even The Client Side Method Call Also?

Jan 28, 2011

iam using the Jquery Uframe with asp.net project.Iam getting a postback problem here.

In side the uframe ,button control getting postback the page even the client side method call also.

i tried with the Html button Control also by setting the type="submit" ,iam facing the same problem.

And I got very limited reference about the uframe(codeflex,codeProject).

View 6 Replies

Switch From Async PostBack To Full PostBack In An Update Panel?

Aug 20, 2010

Is something like this possible?

Dim iCounter as Integer
Dim iQuantity as Integer = 10
Protected Sub btnFoo_Click Handles btnFoo Yadda
For i as Integer = iCounter to iQuantity - 1
//do something with AsyncPostBackTrigger until iCounter = iQuantity - 1
//then trigger a full postback
Next
End Sub

I am new to the concept and feel like there must be something really easy that I am missing.

View 2 Replies

C# - On Postback, How To Check Which Control Cause Postback In Page_Init Event?

Jul 4, 2010

On postback, how can I check which control cause postback in Page_Init event.

protected void Page_Init(object sender, EventArgs e)
{
//need to check here which control cause postback?
}

View 5 Replies

GridView Does Not Databind/refresh Upon Postback Unless The Postback Is Called By Itself?

Jul 24, 2010

Anyone with similar conclusion? GridView does not databind/refresh upon postback unless the postback is called by itself?

View 1 Replies

C# - AsyncFileUpload Postback Does Not Do A Full Page Postback?

Jul 6, 2010

I implemented the AsyncFileUpload control on a web page. This web page requires uploaded files to appear in a gridview. The gridview contains the following columns: "File Name", "Confidential" Check Box, and a "Remove" button to remove the uploaded file.

Since the AsyncFileUpload postback does not do a full page postback, I need to "force" a postback on the OnClientUploadComplete event of the AsyncFileUpload control in order to render the gridview after uploading a file. In the OnClientUploadCompleteevent, I use javascript to call __doPostBack. In this postback, I only bind my gridview and display the file information (I don't re-save the file).

The problem: On the AsyncFileUpload's first "partial" postback, the file is successfully uploaded, as expected. On the second postback that I force with __doPostBack, the file is re-uploaded. You can verify this by using Google Chrome, which displays the upload progress. The behaviour is as follows: After selecting the file, the progress increments from 0% to 100% and the file is uploaded. After this, the __doPostBack executes, and you can see the upload progress increment again from 0% to 100%.

How can I make sure the Gridview is properly populated, but that the file is not uploaded twice?

I attached a sample solution which contains the issue:

[URL]

View 1 Replies

Jquery Postback Maintains Same Tab After Postback?

Jan 27, 2010

I'm using jquery tab and following js method, how and what can i modify it to maintain state of tab between postbacks? (This resets tabs to first tab after page_load)

[Code]....

View 1 Replies

Get Source Of Postback Which Control Causes The Postback?

Feb 10, 2010

if (Page.IsPostBack)
{
//here I need to know which control causes the postback
}

View 1 Replies

Javascript - Postback And Get Value From Html In That Postback?

Feb 4, 2011

I have a js function

function(id){
// do a postback here and get the id on the server side
}

I need to send the id to the server, how could I do this?

any way will do, using additional/hidden controls anything

View 1 Replies

Web Forms :: How To Change The URL Postback

Dec 15, 2010

Within the Properties of the 'System.Web.UI.WebControls.Detailsview', how do I change the post back to a specific URL page?

Front end client code is available at [URL]

View 1 Replies

Web Forms :: How To Keep Usercontrols In Each Postback

Dec 15, 2010

I have several dynamic usercontrols that I want to load them in separete tab panles.but my problem is when the postback occures my usrecontrols diapeare.however I want to keep my usercontrols in each tab panle in each postback.I mention that I write code in c#.

View 30 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved