C# - How To Make A Reference To Public Const String From Aspx Page
Jun 23, 2010How to make a reference to public const string from aspx page with c#
In VB its <% = MY_DATA%>
How to make a reference to public const string from aspx page with c#
In VB its <% = MY_DATA%>
How do declare a public variable .aspx web page that can be used in all the pages within my web application? And/or create a Public Sub?
View 3 RepliesHow can I call a public property declared on a ASPX page from a different ASPX Page? Is that possible? It is a website project. How can I get/call this property from a different aspx page? I have attempted this from the other page, but it is not recognizing the partial class: private Test_Default _test; It does not recognize the "Test_Default"
I.E.
[code]....
in asp.net can i make public objects on my page, for example
public Customer cust1 = new customer();
and use this object on my entire code?
what are the drawbacks of creating public objects??
a single object will be created for all users??? or each user will have a different object?
I have a problem with calling a method on a aspx page from a usercontrol.
The case is: I have 1 main page with 5 usercontrols, when something goes wrong in the code I want to display the error message in a Modalpopup Extender. I can create for each usercontrol a different modalpopup extender but isn't much easier when I make 1 popup in the aspx page. But the problem is: How should I call a method in the aspx page that open the popup?
I have search several hours on the internet but can't find anything useful.
I have a public void procedure, which is on my master page, and I need to be able to call this from aspx page as it is common to a number of pages that will use my master page. How do I do this?
View 12 RepliesMy UI layer calls my business layer which populates a DTO. I need to display properties from the DTO on my ASPX page. Should I create public variables on the code behind page for each of the DTO properties and reference like <%=PublicPropertyName%> OR is it ok to set the DTO instance to public and reference the properties directly like <%=dtoInstance.propertyName%>
Additionally, would it be better if I just created Literal and Label controls for every item on the ASPX page and just populate them from the code behind only?
I have published a aspx website in IIS 5.1. My second page refers to a .dll file of a vb6 program.My backend program is written in c#.At first when I published i couldnt load my second page as I got an error saying that I have to register external com objects....
so I registered the dll file in my root directory using "regsvr32 ". Now after registering im able to access that page, but the buttons are not responding. When I click the buttons on the page the refer to functions in that dll. But its waiting for localhost to respond for a long time and im not getting the results.
I have a basic ASP.NET (4.0) web site (in VS2010)
I have a few aspx forms with in it..
on default.aspx I have a aspxbutton1
on report.aspx I have a aspxlabel
All I need to know is HOW do I reverence the label from the default page and visa versa..
In the web world things are not the same.. This is just an example .. to prove the point.. but I am trying to copy the settings from one object on page 1 to an object on page2.
I have a 2D array of doubles in my Default class on my Default.aspx.cs page, like so:
protected Double[,] time;
By the time the page loads, I have populated this array from a database. Now, I want to reference this array in another file (Diff.aspx.cs) to avoid visiting the database again. Also, the data is used in a read-only fashion.
I Have to add the reference at code behind n page load of this
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
I want to make ASPX page with textboxes and dropdown to insert the data into the database and Gridview to display all the data. I wnat some good designs, how can I make the page more attractive with just textboxes,dropdown ,buttons and gridview.
Do somebody have good aspx page, paste just the design here.
I try to use internationalization in MVC but I can not make the resource strings public to my application.If I follow Steve Sanderson then I have to create a resource file and enter my strings. But in the window to enter the strings I can not choose the drop down to change the modifier because it is inactive (grey).
View 2 RepliesI am new to .net, and I am having a problem that, I am having a couple of web pages which are accessed be two types of roles manager and users, my requirement is that any one with user rights should have only read only rights for a particular update.aspx page how can I do this
View 2 RepliesI want to setup a DB connection from aspx page and not from aspx.vb.
View 1 Repliesi had aspx page control for transferring the application datas to another web page. k when i click the transfer button. the Current page will be inactive. and the User only once time they can transfer the page otherwise disabled.
View 3 RepliesI've created a C# function which extracts data from an mssql database, formats it to a json string and returns that. Now I need to make a call from my javascript (jQuery) slider through an aspx page that is related to the C# code file. I have actually never done anything like this before, from what I could tell by googling I need to use xmlHttpRequest, but how exactly do I make the function get hold of this string? It would be awesome if someone had some example code that shows how this works.
View 2 RepliesI want to make a deployment package for my asp.net 3.5 application. Actually i have to send this to my client who would run this application on his intranet. I tried setup n deployment package type project and it created .msi file.while installing this it create all the files which are lying in the project application. But i want to send all the files in complied format only not directly code files.
How could i convert the aspx.cs files into nonreadable complied files..
Say I have a web site with a master page and an aspx page.In my ASPX page, I am pointing to my masterpage with the MasterType tag.<%@ MasterType VirtualPath="~/mymasterpage.master" %>Say, I've defined a label in the markup of my master page.If you look at the designer code, this label should be something like thisprotected global::System.Web.UI.WebControlIf I type in this "Master.label1", the complier will complain that the control is inaccessible due to the protection level" and rightly so, as label1 is automatically defined as "protected"
View 1 RepliesI build my website in jquery manner. On document-complete I request data from server (by page method) and put it into html by jquery template. So, I wonder, would this HTML be visible to Search engines crawlers? And if not, how to make it visible? Is there a common solution? Or is it a great disadvantage if jquery?
View 3 RepliesI have a datagrid and I set up the paging based on how many rows there are like this
With dgBookings
.AllowPaging = True
.PagerStyle.Mode = PagerMode.NumericPages
.PagerStyle.PageButtonCount = 5
.PageSize = 5
End With
Is there a way to set the horizontal-align in the code too I tried adding this
.PagerStyle.HorizontalAlign = Right
and I get this errorArgument not specified for parameter 'Length' of 'Public Function Right(str As String, Length As Integer) As String'.
i have 2 aspx files . I need to access a public function in b.aspx from a.aspx. How can i do that in asp.net using C#
My function from a.aspx is the following:
<script language="C#" runat="server">
public String user()
{
return l1.Text;
}
</script>
Can I put public static int[] MyArrayCounter declared in separate class Main.cs into webpage Default.aspx between code tags <%= %>?
More info of what i do:
I have declaration in Main.cs:
[Code]....
In class Checking.cs i fill MyArrayCounter with 29 values. After code execution ends, i'd like my Default.aspx page to bind to that MyArrayCounter values like:
Label1.Text = MyArrayCounter[0]
Label2.Text = MyArrayCounter[1]
etc.
I have declared a variable as public (Visual Basic 2008). As a result I can call its value in all subroutines. However I cannot change its value in any of the subroutines?! How to do that? The variable I'm having trouble with (see code below) is called 'antwoordbestand' and I want to change its value in subroutine startKnop_Click.
[Code]....
1)How to make Default.aspx page a Secure socket layer page?
2)How much code does this take?
3 Is it easy ? i have no idea how this works