Tag: asp.net

Globalize Database ASP.NET MVC

I would appreciate some thoughts here, we have globalized all the static content on the our site without issue but now we have come to the database content that users of the site can enter. For example a user can create a survey with questions and answers and this needs to be globalized as well […]

Sql Server Error Caused by Web Part

I am using webparts to create a dashboard page. To do that i am dynamically loading the webparts. strZoneNumber = “zone” + intCnt.ToString(); UserControl UC = (UserControl)LoadControl(row[“c_widget_path”].ToString());//Loads the usercontrol UC.ID = row[“c_widget_webid”].ToString(); UC.Attributes.Add(“Title”, row[“c_widget_webid”].ToString()); //UC.Attributes.Add(“title” , “Test”); GenericWebPart ucwebPart = wpmDashBoardManager.CreateWebPart(UC);//creates a webpart wpmDashBoardManager.AddWebPart(ucwebPart, wpmDashBoardManager.Zones[strZoneNumber], ZoneIndex);//adds it to a zone wpmDashBoardManager.Zones[strZoneNumber].Visible = true; My webpartmanager […]

strip html – Whos job is it?

In db I have : (have = existing situation. the DB has already has the data) Long html string (nvarchar max) user have : asp.net aspx page mission: extract from the whole html string 1 specific sentence – and show it to user options : 1) do the strip job in sql and transfer the […]

One database to log in, use different database depending on person

I’m planning to do a website where people have to log in to access it. Easy enought. Now, once they log in, depending on information in their membership, I want the website do use a specific database. So I could have 100 database, with the same structure, but with different data for each specific group […]

How can I find Membership type string for my local SQL Server 2008

I am new to ASP.NET and C#. I am trying to connect a SQL Server database (its local) to a form for the first time. I was able to find out connection string through server explorer but I can not find Membership type string.. <membership defaultProvider=”SqlProvider”> <providers> <clear /> <add name=”sqlProvider” type=”??”/> How can I […]

C# ASP.NET – Cannot update data through GridView

I have 2 tables called company and customer. Company is the base table, and it has two column: CompanyID and Companyname. And the customer table has comapnyID as it’s foreign key. I use gird view to display all the customerID, CustName, CustAddress and companyID. To update companyID field, In the grid view, I use a […]

How to Extract data from a SQLDataSource to a datatable

Is it possible to store data that is retrieved by SqlDataSource in a DataTable? I mean, If I dragged and dropped a GridView and an SqlDataSource and then I set up those controls in page designer in Visual Studio, is it possible at some time later to retrieve the data retrieved by the SqlDataSource and […]

Xml from sql table

I want to get the contents of a sql table using xml: projectID – projectName – customerID -customerName – city i want to list all columns in xml tags and nest the customer seperately inside a project element how can i then use this in .net correctly?

How to generate hierarhical menu from database with heading

Is it possible to add the heading for each menu list? Something like: <asp:Repeater ID=”Repeater1″ runat=”server”> <HeaderTemplate> <h3><%# Eval(“Country”) %><h3> <ul> </HeaderTemplate> <ItemTemplate> <li> <%# Eval(“CityName”) %> </li> </ItemTemplate> </asp:Repeater> So that you have something like: Country 1 City 1 City 2 Country 2 City 1 City 2 Country 3 City 1 City 2 and […]

Transaction Scope with Two Connection Methods

My ASP.NET MVC application is using Application Services for Membership. For a number of reasons I am not using the Application Services Profiles. I am managing profiles in a bunch of bespoke tables that are connected to the Membership tables. My Domain Model consists of classes that map with Entity Framework (DbContext) to my tables […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.