When and why would it be a good choice to keep the view of two different sets of information on the same page, and just change what's visible depending on different parameters?
For example, an application I'm working on has three levels of users: Admin, Director and Project Manager. We have a Managers.aspx page which follows this flow ...
Let's say I have a DataTable:
DataTable dt = new DataTable();
dt.Columns.Add(new DataColumn("Country", typeof(string)));
dt.Columns.Add(new DataColumn("State", typeof(string)));
Now I populate it
DataRow dn = dt.NewRow();
dn["Country"] = "1";
dn["State"] == "2";
// Add it
dt.Rows.Add(dn);
That works fine. Now if Country and State ...
Here's the problem:
I have couple of pages which gets its content from a database. The content is displayed in a Literal control kept on an asp.net page.
The article sometimes gets quite long so I want to break the content into two parts using a client script. Unfortunately I cannot change the query to pull data partially. The entire d...
I have logged in to the site with my webbrowser and whenever I try to call
WebClient myWebClient = new WebClient();
string str = myWebClient.DownloadString("http://localhost/myxml.aspx");
Response.Write(str.ToString());
Or
XmlTextReader reader = new XmlTextReader(url);
while (reader.Read()) {
Response.Write(reader.ReadOuterXml());
...
Why does this code not compile?
It gives me the error:
not all code paths return a value
Code:
public bool isUserProfileHashed(string username)
{
bool isHashed = false;
MembershipUser u = null;
u = Membership.GetUser(username);
if (u != null)
{
try
{
u.GetPassword(); ...
I have a user control that when a method is called dynamically adds images to an asp panel. I have placed this control in a repeater. I am using the following code to call the function. I have tried calling this function on page_load, databinding of the repeater, databinding of the item, and oninit.
foreach (RepeaterItem repit in r...
I know I can get a reference to the default Profile in ASP.NET with code like this:
ProfileBase p = ProfileBase.Create(username);
(I know there is also HttpContext.Current.Profile, but that is for the current user, and I need to get the profile by username.)
The above code works only for the DEFAULT provider as defined in the default...
Hey guys, this is more something like "what to do?" than a question in fact... here it is:
I have a page in which users can execute selected services.. each of these services are different full .aspx pages (there's a lot of them).
the page is divided in 3 sections, as you can see in the picture:
Panel A: lists the selected services...
I am developing an application on my win XP box. I use visual web dev to run the app interactively but I have also set it up on IIS for testing from another machine on my network. This all worked perfectly until...
Microsoft had a high priority update in the form of IE8 and after the update failed to reboot. After a silly amount to t...
I have a single page which collects related data into a series of input fields.
When the user clicks submit I want to insert the data into two different database tables in one go. ie I want to get the primary key from the first insert, and then use it for the second insert operation.
I am hoping to do this all in one go, but I am not s...
I have a user control with property (*.acsx.cs):
public partial class controls_PersonAccessStatus : System.Web.UI.UserControl
{
public Person Person { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
}
}
Is there some way to pass parameter to this control in *.aspx, something like this
<% foreac...
Hello
I get the following problem when trying to open an ASPX page in FireFox:
"XML Parsing Error: no element found
Location: http://localhost/FrameworkTest2/Default.aspx
Line Number 1, Column 1:"
This site works fine in IE.
To get to the root of the problem, I removed all code and built a "Hello World" page instead.
This works in I...
I'm usng this: http://schemas.microsoft.com/cdo/configuration/smtpauthenticate
The schema is down? My software doesn't work anymore. Gives me a message: Can't access to CDO Message. I'm using Framework 1.1 with mail send authentication and failed.
Anyone have solution?
...
How can I localize/internationalize attribute values in .NET?
My specific example is for ASP.NET web parts such as WebDisplayName, WebDescription, etc. where I inherit from the base class that uses these attributes.
Also, is there any difference to doing this with attributes declared in my own classes?
Thanks!
...
Basically I want the effect that would occur if I were to edit the web.config file. The application basically completely unloads itself and starts again, thus re-firing Application_Start and also ditching any dynamically created Types created by the now-defunct AppDomain.
EDIT
I need to do this in my C# code inside my web application. ...
While user uploading a file, is it possible to know if the uploaded file is an image or not,
I am open for any solution, Client Side, Server Side or both and we choose based on the case.
...
Hello again; i try to save xml data from xml file. How can i do that? if i use below codes, XmlStream return null "throw null". How can do that?
my data:
<list>
<subscriber Type="Random">
<name>yusuf</name>
<surname>karatoprak</surname>
</subscriber>
</list>
public static XDocument GetRawsSnippetAsXDocuments()
...
hello all
i want to change .aspx to like .abcd with rewriteModule in asp.net and iis7?
therefore when user typed home/default.aspx must be redirect to home/default.abcd
please help me
excuse for my weakly english writing
thanks all
...
I would like to create routing rules like the following:
www.app.com/project/35/search/89/edit/48 ---> action is edit in the project controller
The passed variables should be project# (35), search# (89), and edit#(48)
Can someone help me structure a routes.MapRout() for this.
I want to use:
routes.MapRoute(
"Default",
...
Hi!
I need to execute an SSIS Package on SQL Server 2005 but programing them using the javasript code for a page web.
Anybody can help me please??
Thank you!
...