|
Obviously you need to maintain a count of the number of controls and increment the number using said number in the control ID. You can keep a variable somewhere, client-side or server-side, or you can count the number of existing elements and increment.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi
the second parameter suppose to:
Indicates whether execution of the current page should terminate.
but what does this mean ??
where i have to realty use the second parameter ??
thank you
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Tamimi - Code wrote: Indicates whether execution of the current page should terminate.
When we use Response.Redirect , it tries to end the current request and start a new request.The second parameter is endResponse , when it is set to true , it calls Response.End method, which throws an exception when it gets completed. This is bydefault behaviour of this method.This method is provided only for compatibility with ASP.
So it is recommended to set it false, to avoid the exception because it is not good for the website performance.
If you still want to set it true . Then you should firts call CompleteRequest() method. It will avoid calling end method.
|
|
|
|
|
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
I want people to download files, EXE & DOCs from my website but I want to track the download, therefore I don't want them to now the real url so they won't be able to go there directly to download
how can I do hat?
|
|
|
|
|
You can show some link on your website's page. That link should be your website's page (say Download Page). There on pageload, you can write the code for your tracking purpose. Then after you can redirect the user to download link directly.
So user will not able to the download url directly, it will be your pgae link.
One more thing you can do.If you want that user should enter some information before downloading on the download page, after click the link on your page, show a form to user, there after making the entries user should click on a button (say 'Authenticate and Download') then first authenticate the user and after this redirect to the download link.
|
|
|
|
|
Instead of having <asp:hyperlink> or a <a href="" /> with the download file's path, have a <asp:linkbutton>. In the OnClick event of the <asp:linkbutton> first update the table that tracks the number of times this file was downloaded, and then do a Response.Redirect(...) with the executable's file name.
In this case (using LinkButton), you should be generating those links dynamically, say in a GridView so that you could identify the file to be downloaded, else if it's just 1/ 2 downloads you could probably use the LinkButton's Text to identify the file to be downloaded. In this way you will be able to track the number of downloads and the user won't be able to identify the link. A View Source also just shows a __doPostBack for the LinkButton's.
Hope this helps...
Cheers,
Karthik
modified on Saturday, October 9, 2010 6:34 PM
|
|
|
|
|
how can I view external websites on my website in a panel or something similar to the browser control on WinForm?
|
|
|
|
|
there is this jQuery script called mootools.
|
|
|
|
|
I think this can easily be done using iFrame instead of Panel.
|
|
|
|
|
you can use iFrame and ser src attribute to web-page you wish to see.
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
How autocomplete extender used in asp .net?For eg:in a textbox,when we type 'A' then the items start with 'A' will come in textbox from database?How it will appear?
|
|
|
|
|
|
|
Hi all ,
i have one xml file,
format is:
<?xml version="1.0" encoding="utf-8" ?>
<catalog>
<timezone>
<text>sudheer</text>
<value>30</value>
<text>radha</text>
<value>50</value>
<text>mayur</text>
<value>55</value>
</timezone>
</catalog>
i am binding like this in .cs file:
XmlDocument doc = new XmlDocument();
doc.Load(Server.MapPath("~/App_Data/timezoneval.xml"));
XmlNodeList _name = doc.GetElementsByTagName("text");
so i am passing that _name as input parameter to my method
public string getname(string _name)
{
//
}
how to get value from xml using that text.
if anybody knows please let me know
Regards
Rama
|
|
|
|
|
try with
nameNode.NextSibling or else go with xmlreader
|
|
|
|
|
You can use XPath to extract the node(s) you are looking for
doc.SelectNodes("timezone[text=" + _name + "]");
(May not be 100% correct, but you get the idea)
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
_name is not a string, it is an XmlNodeList. That shouldn't even compile.
Loop through the NodeList and for each node get the InnerText. You can find an example on the first page of google search results for "XmlNodeList".
Also, you might want to revise your XML schema. If you want each text element to be associated with the value element following it they should be encapsulated in another element. Order is not always guaranteed in XML parsing.
|
|
|
|
|
|
Hi,
I add an Scripmannager in my webform in, order to use Ajax CalenderExtender.
I drag the calender extender and then drop in my text box. but nothing happend; noreover when I drag it and drop in source code page I face with this error :
the operation couldn't be completed.invalid formatetc structure
Do you have any suggestion?
if I wanna use drop down calender what is your idea?
thanks for your help.
|
|
|
|
|
|
You need to code with more than just your mouse.
I actually recommend not using your mouse at all for adding controls to a page. You end up with really poorly named controls. If you add controls by typing them in with source view, you get nice underlining to tell you when something is wrong.
|
|
|
|
|
Hello,
in this page I read something about master page;http://msdn.microsoft.com/en-us/library/wtxbf3hh.aspx
A single master page defines the look and feel and standard behavior that you want for all of the pages (or a group of pages) in your application
As we know, policy page is the same in all the project. as above link, can I create policy page with master page;
Could you please, come one explain more about master page.(a real using of it)
thanks
|
|
|
|
|
Yes Master page can be used to go a consistent look and feel to the entire application. One can include thing some application header and footer.So you can have the policy data or Policy page link on footer.
For details about master page have a look to the following link
Click here
Click here2
|
|
|
|
|
Master pages are typically used to provide things like the navigation links, the stylesheet and all of the other things that people used to used frames to do. All of the things that should be the same on every page in your site should go in the master page.
Other things you can add to the master page are references to common javascript files and libraries like jQuery, or google analytics. You can use your master page to implement the OnError event so that any unhandled errors on any page can be caught at the top level and logged, redirected etc.
|
|
|
|