|
To echo the previous - waste of time. What are you going to do when the user disables Javascript? More to the point, it's immensely annoying when a web developer decides I can't have control of my browser. Find another way to solve whatever problem you have.
|
|
|
|
|
Our Project requirement is that no one should view the source code so I need to disable right click.
Please tell me how do I go about it.
Thanks...
|
|
|
|
|
varshavmane wrote: Our Project requirement is that no one should view the source code so I need to disable right click.
It's not going to happen. Disabling right click is not going to help. If you want to keep your code hidden, run it on the server. If you pass the code to the client, there will always be a way for them to get access to it. Disabling right click is a waste of time.
Or rewrite the whole thing as an ActiveX/Java client.
|
|
|
|
|
I have remove all the toolbars of IE and now I want that right click should be disable so that no one can get the code via right click or by going to view source.
Please help me...
|
|
|
|
|
Like said before, you can't hide your code. Even if you hide the toolbars and disable temporary internet files. The only thing you can accomplish is make it harder to get the code.
|
|
|
|
|
have you ever heard of fiddler?[^]
what you are trying to do is not possible as long as tools like fiddler are available for everyone.
|
|
|
|
|
how can i use different language like KANNADA in my online newspaper project using C# ASP.NET , without font installing.
deepjyoti
|
|
|
|
|
How can i add blog creation in my C#,ASP.NET website.same like subdomain.using blog creation wizard.
deepjyoti
|
|
|
|
|
deepjyoti81 wrote: How can i add blog creation in my C#,ASP.NET website.same like subdomain.using blog creation wizard
What does that mean? What "blog creation wizard"?
|
|
|
|
|
Somehow I can't get my generated RSS feed to work with firefox. I have an ASP.NET page which generates an RSS feed from data parsed out of a HTML page. The feed works in IE7, but firefox only recognizes it as an XML file.
36 Response.Clear(); 37 38 Response.ContentType = "text/xml"; 39 Response.ContentEncoding = Encoding.UTF8; 40 41 Response.Write("<?xml version=\"1.0\"?>\r\n"); 42 Response.Write("<rss version=\"0.92\">\r\n"); 43 Response.Write("<channel>\r\n"); 44 Response.Write("<title>CII Mededelingen RSS feed</title>\r\n"); 45 Response.Write("<description>Deze feed geeft alle recente mededelingen door van de academie CII</description>\r\n"); 46 47 foreach (Announcement announcement in parser.Announcements) 48 { 49 Response.Write("<item>"); 50 Response.Write("<title>" + announcement.Title + "</title>\r\n"); 51 Response.Write("<description>" + Server.HtmlEncode( announcement.Body) + "</description>\r\n"); 52 Response.Write("<pubDate>" + announcement.DatePosted + "</pubDate>\r\n"); 53 Response.Write("</item>\r\n"); 54 } 55 56 Response.Write("</channel>\r\n"); 57 Response.Write("</rss>\r\n"); 58 59 Response.End();
What am I doing wrong?
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
Just a shot in the dark, try type="application/rss+xml", but I think Firefox needs an extension (like Sage) to handle the rss.
|
|
|
|
|
That shot was a hit, firefox now recognizes the feed. Thanks for your help
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
How did you format your code so nicely?
|
|
|
|
|
I use a plugin in VS2005 called CopyAsHtml, I don't remember who made it, but I use it for quite some time now. It's a pleasure to work with as it saves me a lot of time formatting my code for the web.
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
That's a great tool. Thanks for the recommendation!
|
|
|
|
|
I want to select one Row from a datagrid so I create a textBbox(txtname) and Button for the user to write the name in textBox and By the click of the button it select the corresponding row. But it's not selecting the row neighther I'm getting any mistake message I'm I missng some thing? I wrote the code on Button_Click sqlCommand as follows:
SqlCommand myCommand = new SqlCommand("SELECT * from employee where fullname Like %+txtname+%" ,con);
Thank you.
|
|
|
|
|
Of course you are getting an error message, that query is not possible to run. Do you have code for catching and ignoring the error?
You haven't shown the code for running the query. Do you run it at all?
You can not use controls from the ASP.NET code in the SQL query, the database can not access the controls. Add a parameter in the query and add a parameter object to the command object with the value from the control.
---
Year happy = new Year(2007);
|
|
|
|
|
thanks Guffa,
I have the code for cthin the Error. actually the whole code is here below.
try
{
con.Open();
SqlCommand myCommand = new SqlCommand("SELECT * from employee where fullname Like %+txtname+%" ,con);
SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
myAdapter.Fill(ds,"isp_email.staff");
con.Open();
myCommand.ExecuteNonQuery();
dgupdate.DataSource=ds;
dgupdate.DataBind();
con.Close();
}
catch(Exception err)
{
Console.WriteLine(err.Message);
}
finally
{
con.Close();
}
Thanks
|
|
|
|
|
Dear CPians,
I is there a way to use OutputCache in WebControls?
It is very easy to use it in UserControls, But what happens with WebControls?
Am I missing something important?
Thanking you in advance.
|
|
|
|
|
Basically, you can only use the OutputCache directive with a content element like the web page or web user control, and at runtime the ASP.NET parser will process this directive to decide if it should initialize the element from scratch or simply get the output markup from cache. For the custom control, you cannot apply this directive and if you want to support caching for custom controls, you'll need to think of other solutions. For example, you simply use a web user control as a container for your webcontrol.
|
|
|
|
|
how to increase the speed of image in asp.net.
|
|
|
|
|
Im not sure what your mean....Do you mean that you just show the image in thumnail...then show the full size of image if user want to...???
<< >>
|
|
|
|
|
Load smaller images.
|
|
|
|
|
Can anyone help with this?
I have an aspx page with 2 divs both marked to run at server.
<div id="div1" runat="server">
this is div 1
</div>
<div id="div2" runat="server">
this is div 2
</div>
In the page load, I dynamically add a clientside onclick postback to the divs like so:
if (!IsPostBack)
{
div1.Attributes.Add("onclick",
Page.ClientScript.GetPostBackClientHyperlink(div1, ""));
div2.Attributes.Add("onclick",
Page.ClientScript.GetPostBackClientHyperlink(div2, ""));
}
When I click on the div it postbacks ok, but the question is, how do I identify on the server which div sent the postback? (or have I got the wrong end of the stick)?
Cheers
ChrisB
|
|
|
|
|
Hi Chris:
Here is just a suggestion...Before do postback, you store div id into a hidden field...then you can parse this at server side to know which div causes post back...
Hope you get the clue...
<< >>
|
|
|
|