|
Hi,
I'm trying to setup my menu links in my master page so that it can be used by all pages irrespective how far down the page hierarchy you are. I haven't done this in ages, I know it is something like:
<a href="<% "~/Product/Default.aspx" %>">Home</a>
Please can someone advise.
Regards,
Brendan
|
|
|
|
|
Why don't you use asp.net menu control.. for details have a look
You can also use normal html links and give look n feel using css as per your need.
Cheers!!
Brij
|
|
|
|
|
I'm not looking to use it as a menu. I have links across that are used over all pages irrespective where you, so menu control will not work. Like for example Contact Us, Terms and Conditions, etc.
How would I do these links?
I can use html links like I showed in my example, but how do I get the href part correct as "../" won't work.
Please can someone advise?
|
|
|
|
|
Hi All
I have a requirement similar to that seen on codeproject website.
I have a requirement which will allow the user to add HTML text in a control(most appropriate Textbox control in multiline mode) and then save it in a file or database.The text will be displayed later when the user visits the page.
And I want to allow only some HTML tags not all.
For eg Codeproject allows the tag for code and pre
And if I write a script alert("Hello world");
tag is ignored in codeproject.
1.How can I achieve this????
And also when we submit the article on codeproject we add the text in textbox control but when our article is published we see our article on a page not in a control(label).
2.How is this achieved??????????
Please provide guidance for the above two requirements
Thanks
The SK
|
|
|
|
|
Use Regular Expression to select from your html the part you want to show and what you dont want to...
Something like this <TAG\b[^>]*>(.*?)</TAG> (there are lot to improve in this expression)
Choose appropriate regex to select the part to omit.
|
|
|
|
|
hello all.
I want to add flash file in the asp.net master page.
how could it be done..
I'm new in flash ...
could anyone tell how to download flash file(*.swf) ?
do anyone know the sites to add some sample flash files ?
|
|
|
|
|
you can emb an swf file in your aspx page like this
<embed src="~/clock.swf" quality="high" wmode="transparent" bgcolor="none" width="125" height="125" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
Cheers!!
Brij
|
|
|
|
|
vinci007 wrote: do anyone know the sites to add some sample flash files ?
Yes. You have to use Object Tag for that . Just few line of Code !
<object width="500" height="500">
<embed src="PATH_TO_YOUR_FILE" type="application/x-shockwave-flash" width="425" height="344"></embed>
</object>
If you want a complete go through please read this Article in Code Project
How To Play SWF File In Asp.Net[^]
Hope this is helpful to you
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I want the links for the login box coding in C# with the detail expalaination.
Means, what will be the necessary classes for it,database connectivity, etc.
|
|
|
|
|
You can use asp.net membership provider.Please go through the Link for details.
Cheers!!
Brij
|
|
|
|
|
|
Happy new year Sashidhar !! .
Do more CPing !!!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I am using multiline text box.i set size of it 200.
i set property MaxLength="200".
and i am also using RangeValidator of set the fixed no of char.
But it will not working ,it will accept more then 200 char.
plz anyone help me.i will very thankful for him.
|
|
|
|
|
please post your code . It'll be easy to answer then
Cheers!!
Brij
|
|
|
|
|
MaxLength property does not work for when you set Textmode="multiline" . So, you can use ValidatorControl to Validate the range. I am not sure why this is not working for you. You can Try like this.
<asp:RegularExpressionValidator ID="RegularExpressionValidatorForMultiline" runat="server" ControlToValidate="txtMultiLineText"
Display="Dynamic" ErrorMessage="Please limit to 200 characters or less."
ValidationExpression="[\s\S]{1,2500}"></asp:RegularExpressionValidator>
Another alternative solution is to developed one custom control. I found one great article in Codeproject It self.
Extending the ASP.Net Multiline TextBox control to limit the number of characters entered[^]
And For your more Information Read this Post
MaxLength ignored in multiline textbox.[^]
Hope this will resolve your problem.
Let me know if you need more help.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi,
You can use JS to control it.
In page:
<script type="text/javascript">
function validatorTextLength(obj)
{
if(obj.value.length==200)
{
event.keyCode = 0;
return ;
}
}
</script>
And in CodeFile, you need to set
TextBox1.Attributes.Add("onkeypress","validatorTextLength(this)");
when pageload.
Good luck.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:46pm.
|
|
|
|
|
hi sir,
please help me i am fresher in asp.net.
actually when i login with login id admin through pc1 and another user login with same login id through pc2 then pc1 session variable effects pc2 session variable.i mean Session variable is not working properly.why
|
|
|
|
|
hi
you can verify a session by SessionID
those sessions differs on SessionID
Hope to be useful
Mohammad Khansari
|
|
|
|
|
vikas shukla wrote: actually when i login with login id admin through pc1 and another user login with same login id through pc2 then pc1 session variable effects pc2 session variable.i mean Session variable is not working properly
This means, there are some problem is your code. What do you mean by "Pc1 Session Variable Effects Pc2 Session variable".
If you can give proper description of your error I can help you out.
By the way, you can first go through this article, It may help you
Exploring Session in ASP.Net[^]
Let me know if you need any more help !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
If we same username from different systems it doesn't effect session from used for same user in another system, ASP.net uses seperate session for each request from different systems or different browsers. If you dont want two users to use same username you can make use of database to check if the user is already logged in or not, Or you can use array of users in global.asax file where the data is global for all usersm, so that you control the user while loggin in (Checking with the global array)...
|
|
|
|
|
Dear frd's
Is it possible to read data from serial port of client system using asp.net web site. Here is my scenario
I will be having computers connected in LAN and a web application which resides on server. Each client computer will be connected to a external machine using serial port and is ready for reading data, external machine measures equipment details and sends through serial port.
Now I need to read the same data using my web page, is it possible?
Like when we do video chatting our web page reads data from web cam and sends the stream to web page. this way how can I read data from client machine to web page.
Please give me suggestions on how to proceed for this.
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
Hello,
I would show a progress bar when i click on the login button, for this i create a picture and i set the propriety Visible on false, in the button code i set visible propriety on true, unfortunatly when i click on the login button the picture don't be appeared, please help met to show this picture, Thank you verry mutch.
|
|
|
|
|
|
Hello,
Thank you for your answer but i would show a picture (progress bar) whene i click on the login button and when i verify if login and password was good i set the picture on hidden. Please help me, thank you verry mutch.
|
|
|
|
|
I think that your login button works by Ajax
If I think true
if your login button is a asp.net control you can use OnClientClick property and set it by a
javascript function name
<asp:Button OnClientClick="return loginFun()"/>
I emitted other irrelevant properties in the pervious code
if your login button is a HTML control you can use onclick property
<input type="button id="loginBtn" onclick="return loginFun()"/>
and in loginFun you show the progress bar
function loginFun()
{
[Your codes]
document.getElementById("progressBar").style.display="inline";
}
and when your ajax response is recieved you can use this javascript code to hide that
document.getElementById("progressBar").style.display="none";
hope to be useful
Mohammad Khansari
|
|
|
|