|
u r attempting to add a class to asp.net application , for a class to be generally consumable to ur site , it should be placed inside the app_code folder , would u like to place the class in the app_code folder
Why it is recommended?
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
not sure why
But I tend to have my class files in the main folder next to my aspx files
Then any common method files I put in the app_code folder
|
|
|
|
|
It is not compulsory to put class file in app_code folder.
You can put it anywhere in your project but it is better you put it in app_code foler because its easy for you to access thls file in project.
if you put class file outisde the folder and when u r trying to access it in codebehind it throw error "Compilation error as it no longer recognize ur class in CodeBehind"
Hope this help..
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Sonia Gupta wrote: would u like to place the class in the app_code folder
I used to create separate projects for keeping my classes and refer that projects dll in ASP.NET application. I used to keep classes inside app_code folder too as it's a recommended practice since .NET 2.0. There are many advantages for keeping class in app_code, few of them are
1 - All pages in your application can access the classes in app_code
2 - All the classes in app_code are compiled into a single assembly.
|
|
|
|
|
|
Hi,
we have Image stream with hexadecimal values.
0xFFD8FFE000104A46494600010101
Now we need to convert it to asp.net image (System.Web.UI.WebControls.Image) ?
can any one assit for that?
|
|
|
|
|
pubududilena wrote: we have Image stream with hexadecimal values
Is it a hexadecimal string or a byte array?
*jaans
|
|
|
|
|
thanks for reply.
It is a hexadecimal string. It is comming with xml files. So we need to convert hexadecimal string to a Image to show on the asp.net web page.
|
|
|
|
|
You cant convert it to asp:Image , but you can display it to the user
1. Convert the hex string to a byte array by the help of HexEncoding class available in this article[^]
2. Display this data either using BinaryWrite method of Response class or HttpHandlers[^]
*jaans
|
|
|
|
|
Hello,
I have a doubt in Web TabStrip User Control Posted by jqd2001.
There is Main tab and subtabs.He was written raise event for subtabs only.I need to raise events for Main tabs also.How this is possible.?Anybody having idea please help me.
Following is the link for article.
http://www.codeproject.com/KB/user-controls/WebTabStripUserControl.aspx?fid=94911&fr=51#xx0xx
Regards,
Bijesh
|
|
|
|
|
Hello....
I have two DropdownList. and i want to bind second dropdownList on change event of First DropdownList from Database.and value fetch in both dropdownList from DataBase. But Without page Refresh or without autopostback true.
just like http://www.magicbricks.com/property/faces/jsp/user/loginMagic.jsp[^] on Property Search. when select state then bind value in City. without page refresh.
Please Reply me.....
modified on Friday, May 2, 2008 3:36 AM
|
|
|
|
|
The page you describe above is a Java Server Page (JSP)
The refresh is because the code is ran at server side and then posts back
AJAX does not refresh so maybe try that, the cascading drop down you want to look at
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/CascadingDropDown/CascadingDropDown.aspx
|
|
|
|
|
ya dropdownList code is run at server side.
but i havent idea about to use cascading drop down..
so give me some help ..to work in simple dropdownList with javascript ya AJAX..
|
|
|
|
|
Well you need to install ajax
Create two dropdown lists
set cascading properties as so:
CascadingDropDownProperties cProps1 = CascadingDropDown1.GetTargetProperties(ddl);
then post once you have done that
|
|
|
|
|
Hi All,
I need to create a custom layout page and point that layout page to the default.master page. I am totally unware of doing this as sharepoint portal possess several limitation in customizing the portal pages. Expecting your reply
Cheers
Mani.
First have the WILL then u WILL
|
|
|
|
|
|
OK, so all I want to do, is to store the URLs I use for links, in a resource file. Is this possible ? Apparently not.
I need to have a hyperlink column in a datagrid, which uses a URL from the resource file. The trouble is, when I get it into a form that compiles, it won't run, because a resource file is internal, and resets to internal whenever you change it. But, despite the file being in the same project as my page, internal means the page cannot access it.
Is there any way around this ?
Oh, and the DataNavigateUrlFormatString cannot be build from a code behind method at all. The <%= syntax is plain ignored by so many controls, it's hard to work out where it will work and where not.
<asp:HyperLinkField DataNavigateUrlFormatString='<%=VMSURL.ViewURL%>' DataNavigateUrlFields='IDRequest, CaseNumber' DataTextField="CaseNumber" HeaderText="Case #" Target="_blank" />
Renders the <%= syntax verbatim
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink runat="server" Text='<%# Eval("CaseNumber") %>' NavigateUrl='<%# string.Format(VMSURL.ViewURL, Eval("IDRequest"), Eval("CaseNumber" ) ) %>' />
</ItemTemplate>
</asp:TemplateField>
Throws an error because VMSURL does not exist. Changing the resource class to public fixes it, until I edit the resource file and it goes internal again.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I got this sorted, I just added a property to the code behind that returns my string from the properties. Still stupid tho.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am using server variables in the code like:
Response.Write("Some text" & Request.ServerVariables("Somevariable"))
During code review, it was put under vulnerability(Cross site scripting).
I have thought of two solutions for this
1. Create a list of valid URLs and put a check to verify noone has manipulated it.
2. Create a funtion to strip out potential CSS hacks. It will remove characters like '<','>','\r','\n' etc.
Which solution should I stick to? Or is there any other better solution to this?
Will the solution be able to remove response splitting vulnerability as well?
My idea of ideal life : Eat, Sleep, Repeat
modified on Friday, May 2, 2008 2:40 AM
|
|
|
|
|
d@nish wrote: Create a funtion to strip out potential CSS hacks. It will remove characters like '<','>','\r','\n' etc.
This should work. Along with that QueryStrings should be encoded (escaped in JavaScript) suitably.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
I create web site in asp.net 3.5 with login credentials and one WCF service. I use forms authentication to authenticate user. All works tiptop when i works with database but when i call some method in WCF service i got an error Unable to find an entry point named 'FreeCredentialsHandle' in DLL 'security.Dll'. Does somebody know why this hapend?
|
|
|
|
|
Version Mismatch?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Could you elaborate on that? When i use standard authentication everything work fine but when i use custom authentication and authorization i can not work with WCF service. I get error from title. Is there a difference between custom authentication and authorization in .net 2.0 and net 3.5?
|
|
|
|
|
|
Step through the code that should set the value. I prefer to use null as logged out, because it always starts as null, right ?
I have to assume it's not being set, but you need to set breakpoints and examine the session to work that out.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|