|
snehasish wrote: I want to create dll of all files are in APPCODE folder.I am using asp.net 2.0 frame work.
snehasish, You can !!
But first of all tell me why ? If you think about code security , you do not need to worry about that , when you Publish the code from Visual Studio You App_Code folder and codebehind files are compiled into one assembly.
Now back to your solution .
Step 1 : Create A Class Library
Step 2: Copy the APP_Code Folder on that Class Library.
Step 3: Build the Application
Step 4: Delete App_Code From your web sites
Step 5: Add that Dll as a Reference to your web sites
Step 6: Access your classes and methods from that dll
|
|
|
|
|
Abhijit Jana wrote: But first of all tell me why ?
Maybe he wants to reuse the code there in other projects.
|
|
|
|
|
Abhijit Jana wrote: If you think about code security , you do not need to worry about that
Sorry, I don't understand where the benefit of having the code in AppCode is beneficial in the area of code security. Could you explain?
|
|
|
|
|
Colin Angus Mackay wrote: Abhijit Jana wrote:
If you think about code security , you do not need to worry about that
Sorry, I don't understand where the benefit of having the code in AppCode is beneficial in the area of code security. Could you explain?
Sure sir, Generally we put class files on App_Code folder . We can able to access them all over the application . Here all codes are placed as simple class file. So some people think that Its very unsafe to keep code in app_code folder as its placed as plain text format. But if we published the code from Visual Studio all the Class inside the App_code and Codebehind are converted to assembly.
But I prefer to create Class Library
|
|
|
|
|
I still don't see where the security is. Compiling into an assembly isn't adding security as Red-Gate's reflector can just reverse it out again. All that is doing is converting it into the format that the CLR needs in order to run.
|
|
|
|
|
Colin Angus Mackay wrote: ompiling into an assembly isn't adding security as Red-Gate's reflector can just reverse it out again.
Exactly Agree . But from that question I was thought may be he is asking for that his code represent as plain text.
|
|
|
|
|
hi;
Sorry for the delayed response.your suggestions was extremely helpful.Actually i got(in APP_CODE) some code in C#.net.But my project is running on vb.net.so i was trying to covert it by some online conversion tool.But it provided error in my application.So i tried to convert it into dll.Now it works.Thanks again.
|
|
|
|
|
hi,
I have to display the password column of the database in the grid view.But the text mode should be password.How can I do this?
Ragards,
Bill
|
|
|
|
|
I don't know why you are using it. But You can do it using Template Filed in GridView. Add TextBox as a Template Field and Set TextMode="Password"
<asp:GridView ID="GridView1" runat="server">
<EmptyDataTemplate>
<asp:TextBox ID="TextBox1" runat="server" TextMode="Password" ></asp:TextBox>
</EmptyDataTemplate>
</asp:GridView>
cheers,
Abhijit
CodeProject MVP
My Recent Article : Exploring Session in ASP.Net
|
|
|
|
|
when i used that the column was not visible.
|
|
|
|
|
billcodes wrote: when i used that the column was not visible.
Read This [^] article.
|
|
|
|
|
U must store the password in the database in the encrypted fashion for the security reason.
And when u want to retrive,retrive as it is
|
|
|
|
|
<body onunload="CallMyEnd()">
<script type="text/javascript" language="javascript">
function CallMyEnd()
{
// call server side method
alert(PageMethods.GetName());
}
</script>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"/>
-------------------------
and my methods CS.
[WebMethod]
public static string GetName()
{
return "1111111";
}
the explorer return alert undefined
what is the error in this code ?
i try the script on head and now in body the same error ?
ahmed eldeghedy
|
|
|
|
|
The method call is asynchronous. You need to specify a callback function in the call:
PageMethods.GetName(callback);
In the callback function you get the result:
function callback(result, context, method) {
alert(result);
}
You can also specify another callback function for a failed AJAX call. The method parameter in the callback is the name of the server function called, so you can use the same callback for several page methods.
(I never used AJAX page methods before, so I learned something new this day too. )
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
In my web form, I am creating some controls like button, textbox, dropdownlist etc. dynamically. How to create events for those controls like button click or textbox change etc? Any idea on this or it would be great if anybody can provide any useful link on this.
Thanks
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
you need to create them prior to page load in order for viewstate to be restored.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I'm working on an ASP.NET webpart that contains an AJAX update panel but it doesn't seem as though its working. The panel is not refreshing asynchronously as it does in a normal page, I get a postback every time. I read a lot about EnsureUpdatePanelFixups but it seems to be only for webparts in SharePoint not a normal ASP.NET page. Anyone know whats going on here?
only two letters away from being an asset
|
|
|
|
|
I hope you have set the Update Panel Triggers ? If not then please set the WebPartManager ADD / Move / Delete / Close events as Triggers.
And most important thing WebPartManager & WebPartZone must be inside the Update Panel. Otherwise it will not able to handle the events. Most common mistake.
|
|
|
|
|
Actually that wasn't the issue, I was using a link button that was triggering a postback. Your solution is for another issue, using the webpart verbs.
only two letters away from being an asset
|
|
|
|
|
Oh OK.
I am also working on a Webpart, AJAX and MS Chart Controls, so I have spent 2-3 weeks on creating a Dashboard for our company.
Anyways...
Mark Nischalke wrote: only two letters away from being an asset
|
|
|
|
|
I have a MOSS 2007 with SQL / DC / Active directory on it.
I am implementing Forms Based Authentication for Sharepoint and I have added a SQL connectionstring to my Sharepoint web.config files.
Basically this allows sharepoint to use users that reside in a SQL database.
Sharepoint web site has in its web.config this connection string that allows Sharepoint to connect to the sql database that has these users.
<br />
<br />
connectionstrings><br />
<add><br />
name="AspNetDbFBADemoConnectionString"<br />
connectionString="Data Source=www.sqlserver.labs;Initial Catalog=AspNetDb_FBADemo;Integrated Security=True"/><br />
<br />
<br />
</add>
The problem I am having is that every time the Sharepoint Web site is trying to connect to get these SQL users I am getting this error in Event Viewer
“Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: 192.168.200.10]”
SQL Profiler shows that ‘’ ( this is Anonymous User ) is trying to connect to the Master database and obviously failing. Now why would something be trying to establish anonymous connection to Master ?
All Sharepoint Web Sites run with full permissions and they can connect to all databases.
FBA is described here. http://www.devcow.com/blogs/jdattis/archive/2007/02/23/Office-SharePoint-Server-2007-Forms-Based-Authentication-FBA-Walkthrough-Part-1.aspx[^]
|
|
|
|
|
Hi
Can someone show me how is it possible to pass dynamically a filepath for Windows Media Player to play. I am creating an ASP.NET wedsite using Visual Studio 2008 in Visual Basic, but I can't use JavaScript, which is a customer requirement.
I need to know how I can give to Media Player a filepath, which will be selected by the user from the page by clicking on a button and media player will display on another part on same the page. Media Player will be embedded on the page, and will only show when a button is clicked.
Thank you in advance for your help.
|
|
|
|
|
Where are the files ? It seems to me like your page has to postback to do this, because your client lives in the last century. So, what's the issue ? you emit the html to embed the player with a URL to the file on your server. It's not a filepath, obviously, it's a URL.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
The media files are stored on file server, with the url to them on a database. Therefore, users will select their choice from a gridview which will how the url. Can you give me an example of some vb code of how to do this as I need to have the media player appearing in a specific asp:panel, please?
|
|
|
|
|
Where are you stuck ? you need to put a literal inside your panel and then write the script to show the media player to that literal.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|