|
|
I have a requirement to implement user privilege elevation in an MVC3 web app, for both Forms and Windows authentication. This is for a higher privileged user to give assistance to a lower privileged user, e.g. when the lower user is performing a task and requires an admin task to be completed before they continue, the admin user should be able to elevate the same session to their privilege level, perform the admin task, and restore the lower privilege to the session.
Is this even possible, and if so, how can I achieve this? I have no idea where to even begin looking.
This is a duplication of my question asked here on StackOverflow[^]
|
|
|
|
|
Hi Sir,
Im a Software Developer currently working in NCPL.. Here i've a problem regarding Editing of templates at different positions..
We have a ASP.net software where in we sent emails to clients on various occasions. For those events we select templates and edit the data or image in it and send it to our clients.. The problem over here is that i've took a radeditor component and tried to insert a template in it. But unable to edit it at different positions programmatically
.. So i request you to kindly clear my issue as soon as possible..
|
|
|
|
|
Hi....
Can u explain u r problem clearly please. Are u looking for identifying the positons on a image or you want to split the image into multiple parts?
|
|
|
|
|
Hi Sasidhar,
Thanks for replying to my mail. The main idea is there is a fixed template with text,images,headings etc. User selects this template(text/image in the template) and Edits the text as his wish depending on his requirement. For this editing he uses a editor(HTML editor/RAD editor). This editors will have design and html tabs. Wherein Design will consist of original template and html consists of dynamically genrated html code. So if a user edits image automatically html code changes. Atlast when his reqt satisfied he sends the template to his client via Email.
This is the process of the module
Regards
Raghavendra Rao
|
|
|
|
|
I have a C#. net 2010 web form application that I am going to maintenance and add linq to sql statements in the existing application. This application communicates with a sql server 2008 r2 professional edition database.
My problem is acutally wanting to know who to debug (step through) the code. I can get the general idea of what the code does. Howeever, I would like to know how to step through the code. Can you give me some help in this area?
|
|
|
|
|
Highlight the first line of code where you want to start debugging and press the F9 key. Press F5 to start the application and it will come to a stop on the line with the breakpoint set. Press F10 to go to the next line or F11 to debug into a method. You can hiver over varibles ot see the current value, add a watch to a variable so that yu can see the value changing or right click and quick watch to see all of the properties of a variable or whatver at that moment in time. That is a small part of what you can do - you shoul dtry reading up on the subject before starting.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
how to make a project in notepad through .net
|
|
|
|
|
This question is not at all clear, please try explaining in more detail.
|
|
|
|
|
You mean something like this[^]?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
do you mean you want to create your project without Visual Studio ?
|
|
|
|
|
I have to host a website on LAN using IIS, I want that all LAN users would be able to access only home page of my website, after sign in or register they will be allowed to navigate to other pages.
How can I do this?
My website is developed in classic asp..
|
|
|
|
|
Zubair_Shah wrote: My website is developed in classic asp..
By default, IIS has few defined startup pages like default.asp, index.asp, etc. Either make your login page by any of these name or add the login page as the start up page in IIS for your website. In IIS, see in 'Documents' or 'Default Document' tab for it.
|
|
|
|
|
//It is for Upto Windows XP and Server 2003.
Right click on your project in iis--> Propertis --> Documents Tab --> Click on Add Button --> Write Your Start up page name with extention. --> Make it as first item in the list by clicking on up arrow. --> Click on OK.
// Windows 7 and above
Select your project, you will find some options in the middle pane. You will identify the DefaultDocument option. Double click on that, it will open a dialog then write your Start up page name with extention. Autometically it will shows the page in first position.
|
|
|
|
|
right click on webpage ---select set as startup page that's it by defalt websites on server run by index.aspx/default.aspx/home.aspx
|
|
|
|
|
I would like to use your color trackbar in a vb.net app. Will I've done a fair amount of coding with vb.net I have not tried to incorporate a C resource such as your color trackbar. Can you or another reader help me?
You can email be directly if you want:
carlferguson@bellsouth.net
Thank you very much.
Carl
|
|
|
|
|
Exactly who are you addressing this question to?
|
|
|
|
|
Not a good idea to post your email address. Also, what is the color trackbar? Be more specific.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi,
I am new in ASP.NET c# web application development. I am creating a simple Account Management application. I am experiencing an error when using QueryString to pass value to a form. I have a main form named WebForm1.aspx. When I click a button named View List, it will pop-up a separate window with a gridview displaying all the account from a SQL database. The new window is called frmList.aspx, the gridview has a button on each row, and when I click the button it should transfer the data from the row to several textbox in the first page, WebForm1.aspx. But after I click the button it gives me an error. Below is the code behind for frmList.aspx
protected void Page_Load(object sender, EventArgs e)
{
if (ClassProj.GetDBconn() == true)
{
String SQLstr = "SELECT a.ID, a.NAME AS Name,b.NAME AS Industry,a.subindustry as SubIndustry,a.geo AS Geo,c.NAME AS LocType FROM mpsacct AS a,industry AS b,location AS c WHERE a.industry=b.id AND a.loctype=c.id";
MySqlCommand cmd = new MySqlCommand(SQLstr, ClassProj.mycon);
MySqlDataReader reader = cmd.ExecuteReader();
grdAll.DataSource = reader;
grdAll.DataBind();
reader.Close();
cmd.Dispose();
}
ClassProj.CloseConn();
}
public void MPS_Selected(Object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Select")
{
int index = Convert.ToInt32(e.CommandArgument);
string name = grdAll.Rows[index].Cells[1].Text.ToString();
string Industry = grdAll.Rows[index].Cells[2].Text.ToString();
string SubInd = grdAll.Rows[index].Cells[3].Text.ToString();
string geo = grdAll.Rows[index].Cells[4].Text.ToString();
string location = grdAll.Rows[index].Cells[5].Text.ToString();
Page.Response.Redirect("WebForm1.aspx?name=" + name + "&industry=" + Industry + "&subind=" + SubInd + "&geo=" + geo + "&location=" + location);
}
}
|
|
|
|
|
I see a lot of issues but I am not sure if any are the actual error.
1. You likely need to check for Page.IsPostBack() in your Page_Load event and only DataBind when it is not a postback.
2. When you Respone.Redirect go to the root. So, do Response.Redirect("~/WebForm1.aspx") or whatever the path is. 404 means the page cannot be found.
3. URLEncode your parameters in case they have spaces or other special characters.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Thanks!I will try those changes. I am not sure what Page.IsPostBack() but I will do a research on that.
Thanks!
|
|
|
|
|
There are a lot of controls in .Net which cause postbacks. For example a button when clicked and even dropdowns, although you can control it. So, you normally only want to retrieve your data when the page loads for the first time, not when controls are causing a postback. So, in Page_Load check if (!IsPostBack()) then do your select.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I tried your suggestions but, this time everytime I click the select button it still gives me the same error. Here is the code behind from the WebForm1.aspx
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MySql.Data.MySqlClient;
namespace AccoutMgt
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Page.Request.QueryString["name"] != null)
{
txtMPSname.Text = Page.Request.QueryString["name"];
txtLoc.Text = Page.Request.QueryString["location"];
DlstGeo.DataValueField = Page.Request.QueryString["geo"];
}
}
protected void BtnSearch_Click(object sender, EventArgs e)
{
}
}
}
and here is the code from frmList.aspx
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MySql.Data.MySqlClient;
namespace AccoutMgt
{
public partial class List : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (ClassProj.GetDBconn() == true)
{
if (!IsPostBack)
{
String SQLstr = "SELECT a.ID, a.NAME AS Name,b.NAME AS Industry,a.subindustry as SubIndustry,a.geo AS Geo,c.NAME AS LocType FROM mpsacct AS a,industry AS b,location AS c WHERE a.industry=b.id AND a.loctype=c.id";
MySqlCommand cmd = new MySqlCommand(SQLstr, ClassProj.mycon);
MySqlDataReader reader = cmd.ExecuteReader();
grdAll.DataSource = reader;
grdAll.DataBind();
reader.Close();
cmd.Dispose();
}
}
ClassProj.CloseConn();
}
public void MPS_Selected(Object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Select")
{
int index = Convert.ToInt32(e.CommandArgument);
string name = grdAll.Rows[index].Cells[1].Text.ToString();
string Industry = grdAll.Rows[index].Cells[2].Text.ToString();
string SubInd = grdAll.Rows[index].Cells[3].Text.ToString();
string geo = grdAll.Rows[index].Cells[4].Text.ToString();
string location = grdAll.Rows[index].Cells[5].Text.ToString();
Page.Response.Redirect("~/WebForm1.aspx?name=" + name + "&industry=" + Industry + "&subind=" + SubInd + "&geo=" + geo + "&location=" + location);
}
}
}
}
|
|
|
|
|
Is WebForm1 in the root of the site? That is what the ~ does. It puts you to the root so make sure that Response.Redirect(path) is correct.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
They are located on the same path. The WebForm1.aspx is the start page and serves as the parent. The frmList.aspx is a pop-up window. Basically what should happen is the frmList.aspx will call back the WebForm1.aspx and pass the values to the controls of WebForm1.aspx.
Thanks,
|
|
|
|