We use an agent to monitor user activity on our site. It manages a user session together by matching the asp.net session ID.
If we were to launch a separate checkout site on a new domain, would we be able to force carry the current Session ID from the standard non SSL site to the new session on the checkout site - this way our agent would match the session together, as we require?
've got a website that's written in php and I'm attempting to re-create it in ASP.NET, so far I think I'm doing well with the help of this great community. How can I carry over pre-existing redirects in ASP.NET? Is there some kind of file that I can store them all in, that gets read?
I need to build an address list gridiview that has 3 search boxes - First Name, Surname, Address. How do i set it up so you can use one of 3 different where clauses? or possible 2 where clauses prior to the databind??
I dont want to search / filter a gridview that has already been databind, i want the search to go straight to the DB if possible.
Look at the first hyperlink I've added the selected value which takes me to the next page.On the Pending DDS.aspx page what do I put in pageload?I want to take the selection over in a query string 0..I have a radio button list on the Pending DDS.aspx page so when you come in on the first page click 250 button (in radio button list) and then click the link to go to Pending DDS.aspx page I want that radio button to be selected when the user comes to that page.
I have a custom control that inherits from .NET's CompositeControl class. This control overrides the CreateChildControls in order to build its child controls dynamically. I need the page to post back after a couple different javascript events occur on the client side.
In order to accomplish this, I create two hidden controls on the page so I can set their values with javascript, submit the page, and read the values out on server side. Here's is the code I use to create these two hiddens:
As what other member said in this community, the data assign a public variable may be shared among users, therefore, how am be able to declare a property that will accept an array of values using List<string>? The variable will be use in about fifteen pages...if I am going to declare this on each of the page, this will result to difficulty in maintaining the code of my program.
I have a very simple user control with 5 radio buttons on it, and 3 properties (ID, RatingSetID, and Rating). On the initial load of the page they are on, the code acquires data and places the data into the 3 properties. However, when the submit button is clicked the page reloads and the 3 properties get reset to 0, they are in the !IsPostBack as well.
What is the best way to get a number of property values of a business object from the View to the Presenter in a WebFormsMvp page?
Bearing in mind this issue with DataSources: [URL]
Here is what i propose:
The scenario is, I have a business object called Quote which i would like to load form the database, edit and then save. The Quote class has heaps of properties on it. The form is concerned with about 20 of these properties. I have existing methods to load/save a Quote object to/from the database. I now need to wire this all together.
So, in the View_Load handler on my presenter i intend to do something like this:
this is about ASP.NET, ViewState, UserControls and loosing the values of my properties. It is an classic question by know, I know, and even though I have searched here and on Google for a resolution to this problem, I havent succeeded. On the contrary, the more I test different things, the less I understand it seems.
On top of this I am using ext.net and their so called DirectMethod's but I dont think that has much to do with this problem. There are numerous questions I have and I hope that this text will be fairly readable and understandable =)
The UserControl
I have a UserControl, Customers.ascx, that contains some Properties. The "most" important is *_CustomerId*. The _CustomerId is set in code-behind, in ext.net's "DirectMethod" like this (code below from the Page Customers.aspx):
I have a ASPxGridView. In it(for the uninformed) is only a DataSource property for telling it what data to load. My problem is that I'm simply trying to mock up an example and don't need to tie it to an actual database. How would I do this? I basically just want a few rows and some columns but since it only takes a datasource I'm not sure how to do it. Would ObjectDataSource be what I'm looking for?
I am working on a page whereby all the controls within the page get translated to another language.
This is handled within the master page prerender event and generally works fine.
However my page consists of a multiview control that is made up of 2 views. By default the INSERT formview is displayed so the user can enter form detials. This translates fine.
On clicking the save button the multiview active index is set to 1 and the EDIT formview displayed so as the user can update any of their details. This view does not get translated.
It would seem this is due to the controls not being available at this point in the page cycle or when this button event fires.
So i opted to do the translate process within the prerender event of the EDIT formview, and the method does have access to all the controls within this formview and runs after the master page prerender event. So all should be good.
However it seems that all th epage properties at this point in time are cleared. So the translation doesnt work. At the point of master page prerender i have verified they are populated with the values, but as soon as i hit the formview prerender all the page properties get cleared to nothing...
The following action in my controller does not update the Model property which is bound by a radio buttons group (all are named "ListType") when the form is submitted. On the Edit.ASPX form, I used JQuery to reset the radio buttons group. When setting other type of input elements on the form to blank or checked=false, those Model properties are set accordingly upon submission. Does anyone know how to set radio buttons to unched state?
Also I am trying to get the SqlException to show up in my form where I have Html.ValidationSummary helper. My ModelState helper captures the know business rules violations, but I am unable to pass any SqlException and its Message property to this helper class due to unexected exception.
1: I have a .html file that has some markup with some placeholder tags.
[code]...
4: PersonInfo.aspx is literally empty since I am injecting html from code-behind.
When the PersonInfo.aspx is called the html-template markup with appropriate values in the placeholder will be displayed. Also there are chances I would like to send the final markup in an html email (though that is not part of the question as I know how to email).
Is this the best way to fill values in my html-template or is the any other better alternative?
Note: This is a very simple sample example. My class is very complex involving objects as properties and also my html template have 40-50 placeholders.
So code in my step 3 will need 40-50 Replace statements.
I'm constructing a User Control that will have one Property called "ContractIdx". Here's how I've constructed this Property:
public int ContractIdx { get { return Convert.ToInt32(this.Attributes["ContractIdx"]); } set { this.Attributes["ContractIdx"] = value.ToString(); } }
I'm initially loading the User Control by passing a parameter to it and setting ContractIdx accordingly. That all works fine.
Upon Postback though I'm loading the User Control without any parameters and then setting its ID property to what it was before the Postback. My understanding was that if I did this then ViewState would properly restore everything. Yet apparently this is not the case with the "ContractIdx" attribute.
Where am I mistaken in my understanding? How should I change things to get this mechanism to work?
Using the properties as defined in a class, how about can I put them into the ParamArray parameters argument of my function. The code as follows:
Public Class MyObject Public Property Prop1 as string Public Property Prop2 as integer Public Property Prop3 as Boolean Public Sub AddNewMyObject MsSQL_ExecuteNonQuery("StoredProc_AddNewMyObject", ________________?) End Sub End Class Protected Function MsSQL_ExecuteNonQuery(ByVal storedProc as string, ByVal ParamArray parameters as object()) 'Some Code here. End Function
I need a way to create unique values for a property in my custom server control..
In this case I will have the poroperty called "Name" and I neeed the value of Name to be unique for each "instance" of the control...
So for instance if I have a page with more then one instance of the control, I dont want the value of the Name property for these instances to be allowed to be the same..
...to put it kind of simple, if I dont remember this incorrect, I want it to be sort of like the ID property..but with another name then ID.
I have a user control which has some properties configured on it. I need to access (actually, only read) the values of those properties on the client. I have done it like this.
Code behind:
[Code]....
ASPX:
[Code]....
That works but, at the back of my mind, I'm sure I've seen a neater way of doing it, although I suspect that may have been on an Extender not a User Control. Pointers on that welcome.
Also, related to that, the User Control itself has an Id which becomes part of the name of all visual objects included within it. However, the User Control is not a DOM element in its own right (because it has no visible rendering) which [I think] means that I have to attach properties to one of the visible elements within it, and not to the control itself?
I have a ASP.Net page that has a gridview control. This gridView control has a checkbox controls. I would like to assign a boolean value from a database field to the Checked property- Checked='<%# Bind("RESULTS") %>'.
When page loads,I get error - Specified cast is invalid!
Note: If a constant value is passed at design time it works fine. But i want to assign the value at runtime using Bind.
Environment details: VS 2008, ASP.NET 2.0 and .Net Framework 3.0 & C# language.
I tried returning values like 0s and 1s, Ys and Ns and True and False from a database field. But i still get the above mentioned error.
I tried retreving the value in OnRowDataBound event using Eval, since Bind is not available in code behind. But it would make the field readonly and i cannot edit and update the Results field.
Even though there is a value returned by the query why does the Checkbox does not assign the value using <%# Bind("Results") %> to Checked property instead throws error - Specified cast is invalid.
how i can edit and update Checkbox.
where did the Bind method of ASP.Net 1.x is moved? How can i use Bind in code behind of ASP.Net 2.0?When i type DataBinder the intellisense shows Eval and other stuff but i don't see Bind that would solve the problem of two- way binding.
I have created a class which inherits the HyperLinkField. I need to find the data values of the fields specified in the DataNavigateUrlFields property. I have not been able to figure out how to do this.
My httppost action doesnt seem to have received my model. The code is below;
[Code]....
i put a breakpoint on the line; return RedirectToAction("Error", "Dashboard"); and i found that appQualif carried no values whatsoever from the form i submitted..
in my project i kept two forms if i click the first form submit button it will transfer to second page if i click the second page submit button it will transfer to first page . SO WHAT I NEED IS
1. I WANT TO KNOW HOW MANY RECORDS THEY ARE ENTERING i.e IF THEY CLICK THE SECOND PAGE SUBMIT BUTTON THEY COMPLETED ONE FORM I WANT TO MAINTAIN A COUNTING .
I'M NOT GETTING ANY IDEA IF U EXPERTS HAD SOME IDEAS TELL ME WITH CODING.