|
Thanx mate
what about listing teh webforms issue
how can i solve that?
Best Regards
3ala2
|
|
|
|
|
It is a very straighforward but very very long problem to describe. Please, rephrase your question to make it more precise.
|
|
|
|
|
i just want to list all the webforms names in my project "the aspx only" in checkboxlist or a listbox control. i want the dispalyed text is the webform name and the value is the full path for it
i guess i can do the rest of security issues
how can i do that?
Best Regards
3ala2
|
|
|
|
|
I'll explain what I did:
In addition to the above post, I had a webform which had a datagrid that displayed ALL the records for the different permissions which I have defined(recall Permission Table). Remember that EACH Permission represents a Webform, so there is no need to list the page. You can make the Datagrid entries hyperlinks to the weforms if you like.
You can add/edit/delete all the Permissions which you have on that particular webform, just like you can add/edit/delete user records and such, BUT.. EACH webform, EVEN the Permissions webform, will have hard code which will give different users access/denial.
for instance, lets say that in the Permissions table, you have the following record:
PermissionID = 9
PermissionDescription = Permission Webform
and the Admin User Record is:
UserID = 1
Username = Admin
UserGroup = 2(i.e. Admin)
and the UserGroupPermissions Record(in the LINK table) is:
UserGroupPermissionsID = 3
UserGroupID = 2(Admin)
PermissionID = 9
This means, logically, that the admin is linked to PermissionID number 9.
Now lets go back to the webforms. In the PageLoad even of the Permission Webform(which is what you are asking about), you will HARD CODE the following:
After creating a VIEW of the tables which show a link between Admin and the Appropriate PermissionID for the Current page, you will pass the UserID which should be stored as a Session variable as soon as any user logs in. Pass that ID through a SQL query and check whether the UserID in the Session variable HAS the Permission ID of the link table... IF YES, then Load the page, IF NO, then redirect.
You are asking about the webform itself I think. The Webform itself for this will be the same as any other webform for adding/editing/deleting records. Use a datagrid which should be bound with the information from the appropriate TABLES or VIEWS.
When you create a New Permission, like SiteMap Page Permission, you will HAVE TO HARD CODE the permission authorisation as described above, but this time for the SiteMap page.
I hope this answered your question.
-- modified at 9:24 Tuesday 23rd January, 2007
|
|
|
|
|
Thanx u so much
That was helpful and guess i'll do it this way
But still wondering how i can list the project files dynamically
Thanx again
Best Regards
3ala2
|
|
|
|
|
I have no clue there mate, my system did not need what you are asking for, and I havent explored that option lol..
Anyway, I hope you find your answer.
Take care.
|
|
|
|
|
i have a report shows a chart for user
the chart appear for user in default templet
how can i give the user 2 choose the tamplet for the chart in run time
"give him gallery 2 select"
MD_NADA
|
|
|
|
|
Hi All,
I have create Web Application using C#,ASP.NET and uploaded to our Server.it is working Perfectly when I Browser site using Internet Explorer.
BUT When I used Mozilla FireFox,There are UI Issues like Table Rows Alignmets changes,Text Box Width Changes ,etc....
How do I fixed issues and Compatible for Mozilla FireFox?.
Please help me.
Thanks in advance.
|
|
|
|
|
You've just got to figure them out individually. they are going to be slightly different - Firefox tends to be more standards compliant.
|
|
|
|
|
When pages render differently in Internet Explorer 6 and Firefox, it's almost always Firefox that renders them correctly. It's a common misconception that it is Internet Explorer that is the standard just because it's the most commonly used browser at the moment, while the truth is that there are several bugs in IE 6 that makes it render pages incorrectly.
When it comes to form fields, you will never get them to render exactly the same in different browsers and in different operating systems, as it's not defined in the standard exactly how form fields should be rendered. One method that I have had some success with is setting the width of the field to 100% and putting it inside an element with an absolute width.
---
Year happy = new Year(2007);
|
|
|
|
|
hi, thanks for reply.
I have faced Java Script Problems with FireFox.I need to Row visible and Row Visible false using Java Script.My JavaScript Segment is given below.This is working fine with IE. But this is not wroking correctly with FireFox.
Can you please tell me what is the wrong in there?
var row1 = document.getElementById(controlname);
if(row1!=null)
{
if(i<=datarows)
{
row1.style.display = 'inline';
}
else row1.style.display = 'none';
}
Thanks in advance...
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
---
Year happy = new Year(2007);
|
|
|
|
|
I want to select some criteria on on page and according to that criteria second page should be displayed.
Means there are some drop down lists on one page in which some columns of database tables are retrieved and based on that on the next page it should show that critera as well as should have provision to add some data so that it will again send back to the database in proper table.
There are five tables with one unique id and the description or name and there is one table having seven fields or column to save its unique id, five ids from the previous database tables and the description field which has to be filled after selecting criteria.
With Regards
Rajkumar C. Tambe.
M.Tech (CAD/CAM)
|
|
|
|
|
You can store information in Session or Cache.
But put there only the required information, in order to save the memory.
For more info, take a look at:
[^]
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Try taking a look at cross page posting if using framework 2 - might help
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi All.
i need the code to download an exe file using asp.net and C#.
and make the option to save and run after the exe file download.
thanks
srinandan.
|
|
|
|
|
WebClient Client = new WebClient ();<br />
Client.DownloadFile("http:\\blabla.com\file.exe", "file.exe");
To run it, use the ProcessStart class :
http://www.csharp-station.com/HowTo/ProcessStart.aspx
|
|
|
|
|
how to convert any web page like, php or asp or aspx to html page
Ganesh
|
|
|
|
|
When page gets rendered at browser or client side, just save it as desired .html file.
Regards,
Prakash Kalakoti
|
|
|
|
|
Hi,
I want to store ViewStates ViewState.Default, ViewState.BrowserOnly, ViewState.AvatarOnly, ViewState.TextOnly in the variables.
Eg.
if(this.ViewState == ViewState.TextOnly)
{
ViewState V1 = ViewState.TextOnly;
}
But I am not able to find the namespace and assembly for 'ViewState' class.
What to do in this case ?
#Abhi#
|
|
|
|
|
Hi! I am using vb.net. In this scenario I would like to fetch the price value and display it in the label.
Here is my gridview:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="AccessDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None">
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" />
<asp:BoundField DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" />
<asp:BoundField DataField="Ingredients" HeaderText="Ingredients" SortExpression="Ingredients" />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" DataFormatString="{0:c}" HtmlEncode="False"/>
</Columns>
</asp:GridView>
<div class="ForumSig">thanks in advance. Much appreciated.</div>
|
|
|
|
|
You will need to use the OnItemDataBound property event. I used a Datagrid, Not sure about gridview.
When you set OnItemDataBound="Somename"
In your code-behind you should code this:
Protected Sub Somename(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)<br />
<br />
Dim VariableA As Integer/Double<br />
<br />
e.Items.Cells(3[in this case]).Text = VariableA
Then do whatever you want with the variable really.. that's it
|
|
|
|
|
Dear All,
i am bit new to the dotnet world. i am making web application using asp.net ,C# (Visual studio 2005).
i have login form where login_authentication i have writted following code
setting = ConfigurationManager.ConnectionStrings["databaseconnection"];
if (setting != null)
{
// some code
try
{
//SOME CODE
rdr = cmd.ExecuteReader();
if (rdr.Read())
{
Session["member"] = username;
Session["brid"] = rdr["branchid"];
cmd1 = new SqlCommand("Sp_after_ext");
cmd1.CommandType = CommandType.StoredProcedure;
cmd1.Connection = conn;
cmd1.Parameters.Add("@user", SqlDbType.VarChar);
cmd1.Parameters["@user"].Value = username;
cmd1.Parameters.Add("@userpass", SqlDbType.VarChar);
cmd1.Parameters["@userpass"].Value = pswd;
cmd1.Parameters.Add("@brid", SqlDbType.VarChar);
cmd1.Parameters["@brid"].Value = rdr["branchid"];
cmd1.Parameters.Add("@sid", SqlDbType.VarChar);
cmd1.Parameters["@sid"].Value = Session.SessionID;
rdr.Close();
cmd1.ExecuteNonQuery();
Response.Redirect("welcome.aspx"); //Server.Transfer("welcome.aspx");
}
else
{
Login1.FailureText = "Your login attempt was not successful. Please try again.";
}
}
catch (Exception ex)
{
Response.Output.Write(ex.ToString());
}
where this line give me error Response.Redirect("welcome.aspx");
states as THreading was being aborted.
please guide me where i am going wrong
thanks
regards
imran khan
|
|
|
|
|
I suggest you just throw the exception.
Regards,
Prakash Kalakoti
|
|
|
|
|
Response.Redirect causes a ThreadAbortException to be thrown. That's how the framework knows to stop processing the page and do the redirect. If you're going to call Response.Redirect within a try/catch block, you need to explicitly catch the ThreadAbortException and rethrow it.
try
{
Response.Redirect("welcome.aspx");
}
catch (System.Threading.ThreadAbortException)
{
throw;
}
catch (Exception ex)
{
Response.Output.Write(ex.ToString());
}
Jon Sagara
I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So i had to leave the place as soon as possible.
--Mr.Prakash
Blog | Site | Articles
|
|
|
|