|
Hi,
I have a master page and content page. In content page I have to validate the text boxes for
name,address, phone number and email address etc. But as content pages doersn't have html section not head or body section so, where I use this java script in content page to validate the form.
Thanks
seema
|
|
|
|
|
If it is something used by several pages you might want to put it in the master page. Since in your case it is specific to your content page you can just put the script tag right after the content tag. so something like:
<asp:Content ID="Content1" ContentPlaceHolderID="YourContent" Runat="Server">
<script type="text/javascript" language="javascript">
<!--
function TextBox
{
...
Hope that helps.
Ben
|
|
|
|
|
You could try the following. Put your javasscript in a .js file.
<br />
<br />
public void AddJavascript(string javascriptUrl)<br />
{
HtmlGenericControl script = new HtmlGenericControl("script");<br />
script.Attributes.Add("type", "text/javascript");<br />
script.Attributes.Add("src", ResolveUrl(javascriptUrl));<br />
this.Master.Page.Header.Controls.Add(script);<br />
<br />
}<br />
<br />
AddJavascript("~/Scripts/Default.js");<br />
<br />
The above is used to put the code in the master file, but you don't have to.
|
|
|
|
|
Another alternative is to use the ASP.NET ClientScriptManager class which provides methods (e.g., RegisterClientScriptBlock) to add javascript either at the top or bottom of a page. The class also provides methods to test whether a chunk of code has already been added.
|
|
|
|
|
Please, anybody, I need to display an image from an access database. Can you show me how? I can't seem to get any of the example I've found to work
|
|
|
|
|
Oh come on guys, do I ask that much? I'm sure you know, it's not hard, it's just that I get a picture that "cannot be displayed" and when I look inside (with mozilla) I see
/�'���
���!�ÿÿÿÿBitmap Image�Paint.Picture�"��'������PBrush����������Õ"�BMöÔ"��
and more stuff just like that. What am I doing wrong?
OleDbCommand command=new OleDbCommand("SELECT imagine FROM produse WHERE produse.cod_produs=10",dbconn);
Byte[] imagedata=(byte[])(command.ExecuteScalar());
Response.ContentType = "image/bmp";
Response.BinaryWrite(imagedata);
|
|
|
|
|
nc3b wrote: Oh come on guys, do I ask that much?
A bit patience perhaps? If you want 24/7 support with immediate response, you have to pay for it...
nc3b wrote: Response.ContentType = "image/bmp";
Response.BinaryWrite(imagedata);
Is it a bmp file that you have stored in the field?
---
single minded; short sighted; long gone;
|
|
|
|
|
|
Make sure that there is no markup in the page that gets sent along with the image data, only the @Page tag.
---
single minded; short sighted; long gone;
|
|
|
|
|
There isn't, and more, I say response.Clear(); before BinaryWrite()
|
|
|
|
|
I looked into the source again and I tried
Response.OutputStream.Write(imagedata,78,1000);
But now mozilla doesn't say the immage cannot be displayed, it just doesn't print it.
|
|
|
|
|
I did it. Just omit the first 78 bytes from the file. After this wonderful solution, I believe I won't let anyone persuade me again into writing aspx.
Why I don't like aspx.
|
|
|
|
|
In my web application , I have one master page with one tree View control.My tree view showing links based on the user who logined. How I can avoid database reading in Each page with out using Session Variables.
'TreeNodepopulate' Event is executing in each page load. How I can avoid this one.
Please Reply
Urgent......
Thanks in Advance
|
|
|
|
|
did you try using
ispostback property to avoid treeview control updating every time when page loades.
|
|
|
|
|
hi friends
i want to create javascript quiz..
i will get answer like this:
1.percentage of score
2.like totally 5 question,your correct answa was 1/5
3.comments: your scoring is poor
can u help me???
regards
saravanan
|
|
|
|
|
saravanan05 wrote: can u help me?
I don't know who this "u" person is that everybody seems to be talking about nowadays...
If you post a specific question, I am sure that there are a lot of people here who can help you. For a plain Javascript solution you should post in the web development forum, though.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: I don't know who this "u" person is that everybody seems to be talking about nowadays...
U are so bad, he is talking to U, asking U a question and U say that you don't know who the U is.
|
|
|
|
|
Hi All,
I know that Menu control can be directly binded with either Xml data source or site map data source. I know that while using site maps, we can specify the roles for each site map node. I want to know, Is it possible to use SiteMapProvider with Menu control without using built in role or other (Membership) providers. Means all the security related checks will be in some code layer. And only the site map is used to bind with menu control with roles enabled. Also security trimming must be enabled. If it is possible then how the menu control will not show links which are not for a particular user, because the role is identified in code, without any role provider extended ? I know that i sound foolish asking this sort of question but i am struggling with this question for long period now.
Second question is - If a user is in multiple role and i am using menu , sitemap and security trimming is enabled. Then I want to know how can at runtime the users current role can be checked. I want that even if user is in multiple role, at a time on each screen he/she is in only a current node. And there will be facility to switch role form some other screen. Is it possible if i extend the role provider or role manager.
Expecting a quick reply, since I have already started scratching my head.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hi all,
code is given to me
but when i am trying to open that code in visul studio 2005
its giving following error
-----------------------------------------------------------------------------------------------------
‘ Microsoft Visual Studio [?] [X] '
-----------------------------------------------------------------------------------------------------'
' The project file ‘FULL_PATH_TO_THE_PROJECT’ cannot be opened.'
' '
' The project type is not supported by this installation. '
' '
' [ OK ] '
------------------------------------------------------------------------------------------------------
please help me what can be the problem
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|
|
You haven't got the part of VS installed to open that type of project. What's the extension of the project file?
|
|
|
|
|
its a web project and i am trying to open it with .csproj file
and prebuilt .sln file
provided to me with code of that project
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|
|
Do you have the C# section of visual studio installed?
|
|
|
|
|
Install the latest service pack for Visual Studio 2005 and then open the project.
|
|
|
|
|
Make sure you have the Web Developer bits installed - they're not added by default, and without them, you're scuppered.
Use the install CD, modify or repair, and add the bits you need
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
Hi,
In the Windows Marketplace website they have they following tests:
<!--[if lte IE 6]>
<![endif]-->
and
<!--[if gte IE 7]>
<![endif]-->
What does "lte" and "gte" mean? Is it required?
Regards
ma se
|
|
|
|