The problem is when am assigning my session table value to newly created table and if now am changing any coloumn name then the session table value also changing.
But my question is am assigning Session value to newly created table so how should session value should be affected?
I'm trying to write an edit page to my db (with EF4), using the controller only (Homecontroller )On the page and on the controller everything is working fine only (!) that the action it self is not writing the changes to the dbThis is the code I'm using in the controller :
[Code].....
If I understand correct the "ApplyOriginalValues in MVC Ver 2 is the Parallel to "ApplyPropertyChanges" in MVC Ver 1(and this is what I have used ,
I've got a string like this 128000,0000 ,But this should be : 238.000,00 , and i should have it as: 128,000.00
The string can also be 20000000,0000 but also 23000,0000,So the all should be changed, but what is the best way to do this, i'm busy with substrings.. but it would be a load of code for something so easy?
I'm using the above code to display database content on my website. The actual text on database is as follows.
<p>Forbury Investment Network (FIN) is a platform established to facilitate investment in early- and growth-stage companies in the technology sectors.</p> <p>FIN was established by <a title="Clarkslegal" href="http://www.clarkslegal.com/" target="_blank">Clarkslegal</a> and its subsidiary <a title="Forbury Environmental" href="http://www.forburyenvironmental.com/" target="_blank">Forbury Environmental</a>, after 3 years of managing The EIC Environmental Investment Network.</p>
I have a test site and live site on the same server. Links work fine on test server. But when i look at the page on live server it the links are al wrong. www. is missin from both links and [URL] has become [URL]
I am creating a word document dynamically with some html content programatically, in my application. When I open this document with Response.Redirect("MyFile.doc"), it works fine.
But my Client, when trying to print the word document, says that the default setting has to be 'Landscape' and not 'Portrait'.
I am not sure if we have an option of changing the MS-Word Application setting through C#. (I guess it might be possible with Interop, but Interop is not working in our Production environment and so don't prefer that option)
[HttpPost] public ActionResult Start(SomeViewModel someViewModel) { ... }
that based on some conditions returns things like return View("Invalid"), View("NotFound"), View("Run", anotherViewModel), etc. The problem is that no matter what view I present, the URL does not change to reflect the new controller/action. This poses a problem when my View wants to post to a different action. How can I fix this?
I have been given by a designer the HTML show below. This is a menu which will be used in throughout our website in a master page. My worry is how can I handle de the different class used depending when the page is selected or not. Below when on the page the id is "bot_seleccionado" and when a page is not selected it is bot1.
My question is probably a simple one to people used to ASP.NET, So here it is:
I have a webform in a master page that has a listbox which populates itself with numbers which serve as unique id for my objects.
The only problem is that the selected index property of the listbox is always -1 and it automatically deselects itself, no matter what I select. I understand that the index is -1 when you havent selected anyhting, but I have. Here is my C# code that I used to test it and my ASP.NET code:
[code]....
I use the first message box to see what the selected index is and the second to check my 3rd items in the listbox is being recognised.
I need to change the database connection string in the web.config file but havent got a clue how to go about this. Does anyone have any experience with that?
UPDATE Sorry, not very clear above, I want to be able to change a connection string from the web application after it has been deployed
I have the following code running, my dropdownlist (cboroles) is not changing the current item being viewed. This code is running under ispostback = false in the page_load event
I have a GridView on my main page, and each record contains the address of a different Web service. When a user clicks on a record they are directed to a details page for whatever they have chosen. I am displaying a GridView on the details page with an ObjectDataSource pointing to a Web service. My problem is that I somehow want to change the 'Web Reference URL' depending on which record the user chose on the main page? Is this possible or is there another way to go about the problem, such as jQuery/AJAX?
This uses bing's web service. I have a single image button and an array of image buttons. The single changes each time it is clicked to the next image in the array. The problem is if I click it and do a new search the array of image buttons does not change.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using bing_search.net.bing.api; using System.Collections;
I have created an iframe which contains the label, "powered by MyWebsite.site" The "iframe itself" accepts arguments, so other webmasters may customize the appearance of it.
The problem is that since the background of the iframe could be customized, anyone can "vanish" the "powered by MyWebsite.site".
So what option do i have? How should i dynamically change the label color depending on any background?
if there is a way to dynamically change the session ID from the context of a SessionStateStoreProvider (or some other customizable module) in C# for ASP.NET.
I am implementing a custom SessionStateStoreProvider, and I was thinking about augmenting the session ID to tell the store provider where to go look for a session. I've implemented a custom SessionIDManager, which lets me augment newly created session IDs with the required tag. The problem is that the desired value of that tag might change during the life of a session. For example, the session may be read from one location, but may need to written to a different location. In this instance the ID would have originally been tagged for location A, but on writing the store would want to write to location B. The tag should be updated to reflect location B for the next session read.
So, from the context of SessionStateProviderBase override...
... is it possible to change the session ID? I know that the HttpContext.Session.SessionID property is not settable. Is there some other way to feedback an update like this? Or is there a more appropriate to carry state like this across calls?
have two drop down list in my page. When i select one drop down, the value of second drop will change according to the value of first drop down. I don't want page refresh when i select my first drop down. So i use update panel but now when i select the value from my first drop down on the event of selectedindexchanged it will always shows me the default value and if i remove update panel it works perfectly but with page refresh. I don't know what is the problem. Values for both drop down is coming from database. Also i have done !IsPostBack in my page load but i don't know where is the problem..Please check the code below:
I have a webform with difrent parts in it, its like a search criteria, noissues with other parts but theres one part in it called guest profile which is giving me problems.There was a field name called guest company with a textbox by its side, when the user enters the company name and clicks enter it displays the list of people with that company name
but now I have changed this textbox to ddl and populated this ddl with the company names now when I am selecting this company name and clicking enter its not showing the data the code for the above issue is shown below I have also posted the stored procedure used in this
the code used to design the DDL
<tr> <th> Guests Company: </th> <td> <asp:DropDownList ID="ddlCompanyName" runat="server" CssClass="default" /> </td> </tr> the code used to bind the data to this ddl protected void BindCompanyDDL() { var companyList = Company.FindAll(); ddlCompanyName.Items.Add(new ListItem("- Select Company -", "")); foreach (var companyDetail in companyList) { ddlCompanyName.Items.Add(new ListItem(companyDetail.Name, companyDetail.Id.ToString())); } ddlCompanyName.DataBind(); } the code used to initialize search public void InitializeSearch(ref RecipientSearchParams searchParams) { if (!String.IsNullOrEmpty(txtGuestName.Text)) searchParams.GuestName = HttpContext.Current.Server.HtmlEncode(txtGuestName.Text); if (ddlCompanyName.SelectedValue != String.Empty) searchParams.CompanyName = ddlCompanyName.SelectedValue; if (ddlCompanyType.SelectedValue != String.Empty) searchParams.CompanyType = ddlCompanyType.SelectedValue;
the code used to load parameter values
public void LoadParamValues(RecipientSearchParams searchParams) { if (!String.IsNullOrEmpty(searchParams.GuestName)) txtGuestName.Text = searchParams.GuestName; if (!String.IsNullOrEmpty(searchParams.CompanyName)) ddlCompanyName.SelectedValue = searchParams.CompanyName; if (!String.IsNullOrEmpty(searchParams.CompanyType)) ddlCompanyType.SelectedValue = searchParams.CompanyType; public interface IAudenceTab { bool ValidateSearch(); void InitializeSearch(ref RecipientSearchParams searchParams); void LoadParamValues(RecipientSearchParams searchParams); } private void PopulateGuestSqlParams() { if (!String.IsNullOrEmpty(GuestName)) { AddHashValue("GuestName", _GuestName); Description += String.Format("Guest Name {0}; ", _GuestName); } if (!String.IsNullOrEmpty(CompanyName)) { AddHashValue("CompanyName", CompanyName); Description += String.Format("Company Name {0}; ", CompanyName); } if (!String.IsNullOrEmpty(CompanyType)) { AddHashValue("CompanyType", CompanyType); Description += String.Format("Company Type {0}; ", CompanyType); } public List<Person> ExecuteSearch() { PopulateSqlParams(); MSSqlDBProvider db = new MSSqlDBProvider(); SqlConnection conn = db.GetConnection(); List<Person> pList = DataObjectProvider<Person>.GetObjectList("dbo.PersonNewsletterFilterSearch", CommandType.StoredProcedure, pHash, conn); return pList; } stored procedure used (@GuestName IS NULL OR p.FullName LIKE '%' + @GuestName + '%') AND (@CompanyName IS NULL OR p.ID IN ( SELECT Distinct compGuest.GuestId From CompanyGuest compGuest Inner Join CompanyDetail compDetail on compGuest.CompanyId = compDetail.PersonId where compDetail.[Name] = @CompanyName )) AND (@CompanyType IS NULL OR p.ID IN ( SELECT Distinct compGuest.GuestId From CompanyGuest compGuest Inner Join CompanyDetail compDetail on compGuest.CompanyId = compDetail.PersonId where compDetail.[Type] = @CompanyType)) AND
User1 logs in with "User1" as UserName with his password. After it, he fills some form and clicks on SAVE button. After it record saves successfully, but in LoginName control shows some another user name who already logs in, on another machine. [I have number of users]
I checked the web.config file.. The access permissions are defined properly... then what is the reason of it? Everytime User name is changing randonly. So that I am unable to genrate reports.