How To Make Difference In Code
May 11, 2010
This works and returns false ===> (username: <%= this._securityAccesspageBase.DirectReportAccesses.Count > 0 ? false :true%> )
This works doesnt work I was expecting false for the visible property:
[code]....
View 4 Replies
Similar Messages:
Sep 9, 2010
What is the difference between UnManaged code & UnSafe code???? Explain with an example
View 2 Replies
Aug 26, 2010
i have a doubt difference between object code and embeded code .
View 2 Replies
May 11, 2010
On my master page (for all pages in my site) I have a ToolkitScriptManager.
On my content page, there are a series of hyperlinks and divs for collapsible functionality.
The code to show/hide the panels work like the following:
[code]....
If I include a ScriptReference to the jQuery 1.4.2 file in the toolkitscriptmanager, the javascript code is executed incorrectly on the page (only the text for the hyperlink is changed, the div is not actually shown.) However, if I don't include the jQuery file in the ToolkitScriptManager and instead include it in the content page, it works correctly.
View 2 Replies
Mar 27, 2010
<% @
Register
src="myControl2.ascx"
tagname="myControl2"
tagprefix="uc4" %>
Page_Load(object sender,
EventArgs e)
{
myControl2 mc = new myControl2();
//is there anything wrong with the preceding way? Why ever use LoadControl?
Control myLC = LoadControl("myControl2.ascx");
//Why ever do it the LoadControl way?
}
View 10 Replies
Feb 5, 2014
How can I tell the difference between source and published .NET code?
I am looking at some inherited code that I have not touched in about a year. The original designer had me first publish locally before uploading the published code to the internet server. Now I am looking a number of backed up source folders as well bas backed up published folders. I should have done a better job at naming the folders, I guess. Now I wonder: How can I tell the difference between source and published .NET code? Is there some easy way to see if some folder that contains only published code is lacking a file or xml setting?
Is the .csproj file or the .sln file part of the code pushed to the server when you publish? What other differences are there that I are immediate and obvious?
View 1 Replies
Jan 13, 2011
I have a legacy solution where all the DataSources are defined in the markup for all .aspx-pages. The problem I have with this is that the DataSource get instantiated several times since it is used in page, control... What I want is to have NInject to handle the instantiation of the DataSource so this doesn't happen. I have got that part to sort of work, but when the DataSource is defined in the code-behind instead of in the markup the Page property is not set on the DataSource, does anyone know why? A simple solution to this is to set the the Page property in a base class or something, but I do think that the property should be there and want to know why.
View 2 Replies
Dec 9, 2010
We have a .aspx file which has about 400 lines of javascript code. Is it a good idea to have such huge code in its own file? What is the performance difference in having huge javascript code in aspx as against the .js file?
View 5 Replies
Oct 5, 2010
I am a bit confused about the significance of the <form runat="server"> on a page, and its effect on Page and Control life cycles.
For long, I have eliminated any Postbacks or Viewstate from my web forms. I just use web forms to render (often very very complex) UI to the client (composed of server-side controls as well as ExtJs or jQuery widgets etc).
After the UI renders, all interaction with server is asynchronous through web-services or http handlers. So, lately I have started omitting the <form runat="server"> tage also from my web forms.
And to my surprise, the code has NOT broken. The life-cycle events are generated normally on all controls, they have access to normal ASP.NET processing pipeline, and they render perfect;y. As there are no Postbacks, I do not need ViewState or control events
like click etc.
So, can somebody tell me if there's any material difference that <form runat="server"> would make in my scenario, or to ASP.NET page/control life-cycle??
View 8 Replies
Feb 18, 2011
I was thinking about the performance when I use code to hide some control in aspx page using delimiters or in cs file. For e.g. If I have a panel and I want it to get shown following some condition, so I can achieve this by two ways
1: Using code in aspx file, something like this
<% if(isAllowed) { %>
<asp:Panel ...></asp:Panel>
<% } %>
2: In the code file, something like this
<asp:Panel ID="pnlMyPanel" Visible="false"></asp:Panel>
And in cs file
if(isAllowed)
pnlMyPanel.Visible=true;
In my view, first way should be good as it will not at all create any Panel in the page. Am I correct here?
View 3 Replies
Aug 3, 2010
how can i optimized this code? i dont like to have case statement, is there a way i can improve this code?
protected void ddlFilterResultBy_SelectedIndexChanged(object sender, EventArgs e)
{tring selVal = ddlFilterResultBy.SelectedValue.ToString().ToLower();
itch (selVal)
{
case "date":
[code]...
View 6 Replies
Mar 25, 2010
As the title says, I wan't to run some code when the application starts. I have a vague idea that there is probably an event in the application life cycle but I am a bit unsure and could do with pointing in the right direction. So how do I make code run when the application starts?
View 5 Replies
Aug 17, 2010
I have a textbox (txtbox1) which has some value in it. I want to empty the value of textbox. Is that possible in code behind?
View 2 Replies
Sep 3, 2010
I need to create a code that reads the QueryString and set a value on the Session and on the end of the page I need to clear the Session.
How can I make a code like this to run on all .aspx pages?
View 6 Replies
Sep 21, 2010
is there a way i can optimized this code and make this extensions on web.config settings so i can read from there and in future if i need to add or remove i should be able to do easily?
if (fileExt.ToLower() == ".rtf" ||
fileExt.ToLower() == ".xls" ||
fileExt.ToLower() == ".doc" ||
fileExt.ToLower() == ".png" ||
View 5 Replies
Jan 28, 2010
you must have seen widgets like code which people place inside their HTML and it starts showing a small widget in there, how we can we do it in ASP.net, for example if i want to show some specific data of my site to anywhere some specific code is placed, how can i generate that embeddable code that can start showing my specific block of data to anywhere from any site?
View 2 Replies
Sep 23, 2010
Recently, I have read an excellent tutorial from asp.net, MVC music store.
I have discover that we can access to variable in strongly typed views like this:
[Code]....
It is very powerful!
Can we do the same with Web Form in aspx pages?
I ask this question because I think that ASP controls for data are very strict like gridview; in fact my real problem is that I want to make a loop in my apsx code and I think that I can't in Web form...
View 3 Replies
Aug 26, 2010
I have an asp.net mvc project, its build just from views, controllers, models, and other files. I have any codebehind file in my views. Does it makes sense to create them for using sometime? Is it some situation when they giving more abilities and advantage for developer?
View 3 Replies
Sep 2, 2010
I have a simple table
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
and a link
<a href=#>Click me</a>
Is it possible to make the whole block of html code disappear all in once after clicking the link in c#? I was thinking about a placeholder but i'm not sure
View 4 Replies
Feb 9, 2010
I was looking for a chat program, and I found it here in Code Project,Build a Web based Chat using ASP.NET Ajax (http://www.codeproject.com/KB/ajax/aspnetchat.aspx)The code is working perfectly,except 2 issues,can anybody tell me how can I overcome these issues?1-how can I get for example the last 2 hours chat from the database, when a new user enters to the chat room? I tried the getlastmessage stored procedure, but because of the refresh, it keeps showing the messages over and over. any solutions?2-In firefox after I hit the enter on keyboard I see two messages instead of one. sometimes it happens in IE too.
View 1 Replies
Mar 29, 2010
I can't seem to make the RCE work with the following code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> [code]....
View 7 Replies
May 10, 2010
I have two classes (say someclass.cs and someclass.generatedcode.cs). How do I make the someclass.generatedcode.cs inside of someclass.cs (something like a code behind) in visual studio?
View 12 Replies
Nov 19, 2010
Still new. What can I add to my site to get picked up by serch engines without paying for services? Right now if I do a search My site does not appear.
View 8 Replies
Oct 21, 2010
I am using some code I found that generates a random password. I am in the habit of putting code in a seperate file. The code was written in the same file and I'm trying to move it to a seperate file and get the following message. Also, below, I posted
the original code (code on same page as aspx) and what I did (code in seperate file).what adjustment needs to be made to make the seperate code file work?
Compiler Error Message: BC31143: Method 'Public Function GeneratePassword(length As Integer, numberOfNonAlphanumericCharacters As Integer) As String' does not have a ignature compatible with delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'.
Source Error:
[Code]....
ORIGINAL CODE (with code on same page)
[Code]....
MY CODE BEHIND
[Code]....
[Code]....
View 2 Replies
Jan 5, 2011
I am wondering are there any standard mechanisms available to protect the asp.net asp code in the client browser ? I found some references to windows script encoders. Question is,are these script encoders encodes both aspx and code behind source ? If aspx is encoded with the windows script encoders then how client browsers can decode it? Are they aware of the encoding algorithms ?Or can we control the client browsers ( IE, Firefox, Chrome etc) to disable the view source option in the Tasks Menu when web site a loaded in them?
View 6 Replies