|
saud_a_k wrote: src="C:\\file.pdf"
You cannot quote a path like above.
You should use path like
http://<website>/folder/a.pdf
If you still want to use the directory path then it should be like
src="file:///C|/file.pdf"
|
|
|
|
|
The server and client are the same machine
I also used:
string myfile = AppDomain.CurrentDomain.BaseDirectory+"\\310001.pdf";<br />
litShow.Text = "<iframe src="+myfile+" width="100%" height="750"></iframe>";
the file is in my bin folder, but I still cant see the file
_____________________________________________________
Yea! I could be wrong...
|
|
|
|
|
saud_a_k wrote: string myfile = AppDomain.CurrentDomain.BaseDirectory+"\\310001.pdf";
This will return path as
C:\<folder name(s)>\
saud_a_k wrote: the file is in my bin folder, but I still cant see the file
You need to write is as:
AppDomain.CurrentDomain.BaseDirectory + "Bin\\310001.pdf"
|
|
|
|
|
Thanx but it still does NOT show.
I even tried making a html file with the iframe code and tried opening it in the main inframe
it still does not show!
Please try this.... I think its wierd
create a simple html file that displays a pdf file in an iframe
<iframe src="C:\pdffile.pdf" width="100%" height="750"></iframe>
include the file as a part of the project on VS (i use 2005)
now right click in the solution explorer and >> view in browser
does it show?
it doesn't for me.
_____________________________________________________
Yea! I could be wrong...
|
|
|
|
|
hi;
I want to create dll of all files are in APPCODE folder.I am using asp.net 2.0 frame work.
Thanks
|
|
|
|
|
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
|
|
|
|