|
simply you are still able to upload webpages into your server if your server sopport with ASP.NET 2.0
Visit: www.uclick2c.com
for more information
|
|
|
|
|
Hi,
I am Ravindra learning ASP.net.
when I implemented AJAX I din't got any output .
Is my Implementation is correct ? please go through my
implementation and help me how to get output.
1.Added the Reference AjaxPro.dll(V1.1) im my webapplication.
2.Used the following Code
private void Page_Load(object sender, System.EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(WebForm1));
}
[AjaxPro.AjaxMethod()]
public string GetMessageOfTheDay()
{
return "Experience is the mother of wisdom";
}
3.In Web.config I used the following Code
<httphandlers>
<add verb="*" path="ajaxpro/*.ashx"
="" type="AjaxPro.AjaxHandlerFactory, AjaxPro">
<remove verb="*" path="*.asmx">
<add verb="*" path="*.asmx" type="AjaxPro.AjaxHandlerFactory,
AjaxPro">
4.
Used the following JavaScript :
Sample.GetMessageOfTheDay(GetMessageOfTheDay_CallBack);
function GetMessageOfTheDay_CallBack(response)
{
alert(response.value);
}
During Debugging no error is raised but doesn't displaying
any output.....
anybody please Help....
-Ravindra
Ravindra
|
|
|
|
|
|
|
I have to bind datagrid with ilist.Records exist in ilist but datagrid is not bind with ilit.
objlist is the object of ilist having records in in.
Error at this point --->
datagrid.datasource= objlist
datagrid.databind
nikki
|
|
|
|
|
Hi friends,
I suddenly stuck up today will any one help me out. The problem is like this.
I have a site in asp.net where to view pages login is required. I've used form authentication to solve this problem. Now after these pages are called they have links to pdf documents. these pdf documents are visible only if the user is a subscriber to this document.But once the URL is known, any body can know the directly access the pdf documents. Can it be possible with form authentication so that whenever the URL path to the pdf document is entered directly, the user is redirected to Login page.Also how could we distinguish that this user is a subscribed user or guest user and which of document he is allowed to see.
Thank You
Warm Regards:-
Tech4U
|
|
|
|
|
You may want to consider creating an HTTP handler for the PDF requests.
Instead of linking directly to the PDF, you would link to your HTTP handler, passing a document identifier in the query string. The handler would be responsible for handling user security and retrieving the PDF on the user's behalf. Sending the PDF via an HTTP handler would look something like:
using System; using System.Web; namespace Example { public class PDFServer : IHttpHandler { /// <summary> /// Signals whether the instance of the HttpHandler is reusable /// accross requests. /// </summary> /// /// <value>True if the instance is reusable, False otherwise</value> /// public bool IsReusable { get { return true; } } // End property IsReusable /// <summary> /// Performs the needed processing and rendering for an Http Request. /// </summary> /// /// <param name = "context">The Http contect for the request</param> /// public void ProcessRequest(HttpContext context) { // Grab the document id from the query string and use it to determine // the document name and the path. string docId = context.Request.Params["docId"]; string docName = DetermineDocumentName(docId); string path = DetermineDocumentPath(docId); // Set the response header to suggest a default file name. context.Response.AppendHeader(String.Format("content-disposition","attachment; filename={0}", docName)); // Set the appropriate MIME type for a PDF file. context.Response.ContentType = "application/pdf"; // Read the file directly to the response stream, then end the response. context.Response.WriteFile(path); context.Response.End(); } // End method ProcessRequest } // End class PDFServer } // End namespace Example
You can find plenty of information on creating HTTP handlers on the web. I'd recommend looking at:- Microsoft's How To Create an ASP.NET HTTP Handler by Using Visual C# .NET, here[^]
- Michael Flanakin's blog entry[^] on the topic
Hope that helps.
--Jesse
|
|
|
|
|
Who's that? Ahh Jesse Squire! Welcome back !
How are you? You have been quiet for a long time.
|
|
|
|
|
Hiya Minh! Congrats on the 2006 MVP. I see you've been taking good care of the place while I've been gone.
I'm doing well, thanks for asking. I got clobbered by a couple of huge projects at work which burned me out for a bit. How's everything on your end?
--Jesse
|
|
|
|
|
Thanks Jesse ! I'm now busy on a WPF project and trying to dig deeply into WinFX stuff.
Glad to see you coming back to CP as a lot of people including me benefit from this
|
|
|
|
|
Thank u Jesse.
I proceded as u have guided and the outcome is good, but now my program only distinguishes between authenticated user and anonymous users. I need a method from which I can know whether the said user is a subscriber to that document or not.
Now suppose a situation can be created like this:-
A person X has subscribed a document "abc.doc" now X is able to see the document and also can see the full URL. Now if he copy the url and give it to other person Y. Then Y can do these steps to see the document
1)Login
2)paste the url given by X
Then he will be able to see the document, even if Y is not a subscriber to that document.
Please help to rectify this.
Thank U.
|
|
|
|
|
I'm afraid that I don't see a quick answer to this. You're going to have to come up with a security strategy. You will need to set up some kind of way to distinguish who has access to a given document. There are a couple of strategies that come to mind.
If you find that document permissions are grouped in some kind of pattern, then you will probably want to consider a role-based[^] security solution. Basically, what this means is that you'll define the general groups that the documents fall into, and associate a user with each group. The search that I linked has tons of good examples. I'd start with Heath Stewart's article[^] here on CodeProject.
If you can't discern any grouping patterns, then you will most likely have to devise a system of associating a user with an individual document. The easiest approach that I can think of to do so would be a simple table in a database that matches the user id and the document id.
Hope that helps a bit.
--Jesse
|
|
|
|
|
Hi Jesse, I need to work on designing a portal for secured software distribution downloads.
I think you code snippet will help me lot.
I have a small query. Does this mechanism work fine with huge value of data file? say i have an install of 100 MB. Does this work fine?
Please do let me know.
Thanks
Harinath
India
|
|
|
|
|
Technically, I believe it would work. However, I wouldn't advocate it as written for heavy use with large files. The drawback to my code is that the files being passed through the HttpHandler are being read into memory then dumped to the response buffer.
For your purposes, I spend a bit more time looking into securing that directory. You're not the first person to tackle this, so I'd have to imagine that sifting through Google may yield some gems.
If you were interested in experimenting a bit, you could try more of a streaming approach to the HttpHandler. You could use the same basic method, but instead of reading the entire file, use a binary reader to get a chunk of bytes, pass it to the response string, flush the response buffer, and repeat until done. That should lower the memory footprint [may also impact the speed a bit]. The disclaimer here is that I'm throwing an idea off the top of my head. I haven't tried it, but it may be worth some experimentation. If you do decide to go this route, please check in and let me know the results.
Best of luck.
--Jesse
|
|
|
|
|
Thanks Jesse, I will try it out and let you know.
|
|
|
|
|
Hi
1. i have to set the RSS feed for my site..I have tried from every but not getting a proper soluion.if u have some code then plz send me.i'm using (ASP.Net 1.1 with VB).
2. my Second problem is that i have to use the mouseover event on datalist control. exactly what i'm trying to do..i have thumb images in datalist control and a image control just above it.what i want when a user mover his mouse on the thumb image there corresponding large image must be shown in Image Control.
thanx
|
|
|
|
|
hi,
please anybody reply of this query that i am working on web application ASP.net,In my application user has to input there DNS in textbox then on button event i connect my application to that server whose user input the dns but problem is that this application is working fine on INTRANET it will connect to that server but problem in when i hosted on INTERNET it will give this server error as shown.Please reply ASAP :
Server Error in '/' Application.
--------------------------------------------------------------------------------
The requested name is valid, but no data of the requested type was found
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SocketException (0x2afc): The requested name is valid, but no data of the requested type was found]
System.Net.Dns.GetHostByAddress(IPAddress address) +264
System.Net.Dns.GetHostByAddress(String address) +65
try_web.WebForm2.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\try_web\webform2.aspx.cs:81
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
|
|
|
|
|
Hi All,
i have usercontrol on that i have one radiobuttonlist control. and i am using this usercontrol in aspx page and i need to access that control in aspx page. i had written code like below
var control=document.getelementbyid("radiobuttonlist ");
but it is not taking the control into the variable.
can you please give me any idea on this how to access the web server controls value from javascript. this is urgent requirement for me. please anybody give immediate reply so that i can complete this as early.
Thanks in crore in advance
Thanks and Regards
Venkat
|
|
|
|
|
Hi Venkat,
var control=document.getelementbyid("radiobuttonlist ");
U should change ur statement as follows.
var control = getElementById("radiobuttonlist_0").checked;
or
var control = document.forms[0]["radiobuttonlist_0"].checked;
try either of these
hope any one of these will help u
good luck
Regards,
Uma
|
|
|
|
|
HI Uma,
Thanks alot for giving this answer. I will implement this idea and i will come up with the result. Thanks alot once again
Thanks and Regards
Venkat
|
|
|
|
|
You can't access web server controls from Javascript. They only exist on the server and are used to produce the html code of the page. When the page reaches the browser, the server controls no longer exist.
Some server controls procude an html element that directly correspond to the server control. In that case you can access that element from Javascript code.
As a RadioButtonList does not correspond to a single element in the html code, there is no single element that you can access from Javascript.
---
b { font-weight: normal; }
|
|
|
|
|
You'll probably find that the control is prefixed with "_ctl0_" - since it's in a usercontrol.
The simplest way to find out is to turn on Tracing at the top of the page, and make sure that the full client ID of the control is what you expect it to be - having said that, I use the MS IE Developer Toolbar - worth its weight in gold in my book!
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I'm writing a query for search (with Asp.net 1.1 using vb, database Mysql).
like this:-
select * from Buyercentralarticle where ArticleName Like '" & searchnum % &"'"
but its not working what's wrong in it.
thanx
|
|
|
|
|
"select * from Buyercentralarticle where ArticleName Like '" & searchnum & "%'"
Try this. It may help you
Thanks and Regards
Venkat
|
|
|
|
|
hi
thanx for sending me such a gud answer.
but i still need u.i hope u will help me.
1. i have to set the RSS feed for my site..I have tried from every but not getting a proper soluion.if u have some code then plz send me.i'm using (ASP.Net 1.1 with VB).
2. my Second problem is that i have to use the mouseover event on datalist control. exactly what i'm trying to do..i have thumb images in datalist control and a image control just above it.what i want when a user mover his mouse on the thumb image there corresponding large image must be shown in Image Control.
I hope u got my problem and will get positive response from ur side.
thanx
|
|
|
|