I need to declare a variable that is global so i can evaluate roles permissions on page load.
How can i do this?
Thanks in advance!
View Complete Post
Hi All ,
I want to access the static variable in my global.ashx file I am using classname.variable name for accessing the variable but the variable name dose not appear.Can someone tell me how to access static varialbe in *.ashx file.
I have the requirement like read all the Variables in
Script Component Task, which includes variables available at package level and their values, global variables declared at package.
Currently are two ways to read the variables but which are not suitable for my requirement
1) Mentioning the variables at Script designer window as ReadOnlyVariables or ReadWriteVariables
I have come up with form which pulls membership id, allows checkbox selections and commentry (custom feedback). The final piece that needs to be captured is the iframe's url. Now the content in the iframe is content produced by (madcap) flare.
I need to capture the window.location of the iframe url and pass that onto the asp.net masterpage. The iframe is also located in a content page. The iframes content is controlled by it's own TOC. I have added a script to this output so that each time the content (page) in the iframe changes the script alert's me of the new URL of the page just clicked/opened (this is the information I need passed as a variable).
Here is the code producing the desired alert output (page url).
var locationObj = window.location;
The above produces the output I would like to capture (but instead of an alert output, I require this as a string) which will allow the insertion into my form as the final piece of information required.
I am not sure how I can convert or catch the output. Of course I would not want to use the alert function everytime the page changes, but wou
i am working on a web site. my application is simple dot net application and back hand is sql server. to reduce the hacking of the site can any one suggest me some tips.
i wanna to know that when ever the user login i am creating the session variable is that the safe one Or shall i need to create the application variable for that ?
I have to define a global and unchangeable variable in a web page. I used static variable but its content is the same for all users that use the page and it is bad. I dont want use Session variable.
I need to keep a global variable throughout the whole time the user is at my site, but do I use Application or a static class? The string variable should store a region name and my site makes a few changes depending on which region that has been set.
I read that Application was mainly for classic ASP, but I also read that a static class cannot be instantiated at runtime (e.g. when the user has logged in).
So, have I got something wrong here and which solution do I use?
how to declare out global variable? i tried out but get error..
below is my orginal code
Partial Public Class Register
Public badge As String
Public fname As String
Public dpt As String
Public design As String
Public shf As String
Public role As String
Public site As String
Public pname As String
Public preg As String
Public pgoal As String
Public pcom As String
Public poth As String
Public pdpt As String
Public Function pronum() As Integer
Dim mySQL As String
Dim objCN As New SqlConnection
Dim objCM As New SqlCommand
Dim objDR As SqlDataReader
objCN.ConnectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ToString
objCM.Connection = objCN
Dim prono As String = ""
mySQL = "SELECT ProjNo FROM PROJECT"
objCM.CommandText = mySQL
objDR = objCM.ExecuteReader()
prono = objDR(0)
If (prono = "") Then
Return (Convert.ToInt32(prono) + 1)
here is what i wish
I am using the following code:
var dbSelect = Database.Open("XXXXXX") ;
var selectQueryString = "SELECT * FROM XXXX ;
var data = dbSelect.Query(selectQueryString);
I'm looking to have a search page where a user will select an item from a listview, then then taken to another page that wil display data based on their original selection.
A user will type in a string and be presented with a list of usernames that are like that string, when they select a user name who's profile they would like to view I would like the page that they're taken to, to be that users profile.
How would I transfer the variable from the search page to the profile page, and when I work on the profile page, how can I access that variable?
I need to provide some alternate content for my non-Flash users.
I have a directory of video files that is scanned using the DirectoryInfo() function, and I want to use the results to embed all files ending in ".mov" in QuickTime players on a web form.
How would you approach this? Right now I am using the count on the array of videos to determine how many times to repeat the embed code. But this seems inelegant.
Is there a way to have a single QuickTime player.ascx control that gets duplicated according to the number of videos available for display?
How to take
value of bound field of grid in a variable or in a textbox.
I m using
this code in .aspx page for grid.
<RowStyle CssClass="odd" />
DataField="DOC_TYPE_PK" Visible="true" >
<asp:TemplateField HeaderText="DOC TYPE ID" Visible="true"> &nbs
I know I have a valid solution, but the js is telling me that the value in the hdnRecordSaved variable has no value!Even when I specify in my function the following, it still tells me it has no value:var myTextField = document.getElementById('hdnRecordSaved'); alert(myTextField);
When I put the full value of the variable in (ctl00_ctl00_cphTopCenter_cphCenter_hdnRecordSaved.value), I get the correct contents back ("1"), which I set in my code behind. However, I would prefer to just put the short name in since the masterpages may change, etc. Unfortunately, I know I can get around this with VS2010, but we are using VS2008.
What am I doing wrong with the js naming conventions that can't give me the contents? Here is my below js.
<asp:Panel ID="pnlMapFields" runat="server" ScrollBars="Both" Height="430px">
<telerik:RadTreeView ID="RadTreeView1" runat="server" DataTextField="Description"
I have a page in my website where there is very little code-behind. I only have two lines of code in Page_Load() and the rest of the code is declarative ASP.NET code. I have a FormView control which uses a SqlDataSource to get some order information. The SqlDataSource calls a stored procedure called usp_GetOrderDetails, here's the code for the SqlDataSource:
<asp:SqlDataSource ID="sdsFormOrderDetails" runat="server" ConnectionString="<%$ ConnectionStrings:ForexDB %>" ProviderName="<%$ ConnectionStrings:ForexDB.ProviderName %>" SelectCommand="usp_GetOrderDetails" SelectCommandType="StoredProcedure" UpdateCommand="usp_UpdateOrder" UpdateCommandType="StoredProcedure" > <SelectParameters> <asp:ControlParameter Name="orderId" ControlID="grdOrders" PropertyName="SelectedDataKey.Value" /> </SelectParameters> <UpdateParameters> <asp:ControlParameter Name="orderId" ControlID="frmOrderDetails" PropertyName="SelectedValue" /> </UpdateParameters> </asp:SqlDataSource>