|
thanks Christian but I think the problem is the input control created doesn`t have run as server.
any idea how add runat server by js!?
|
|
|
|
|
hi all,
can any body tell me how to learn sharepoint . where to start ..
if u have any related material pls forward to me ...
thanks
|
|
|
|
|
|
|
The problem during writing into an existing cookie, after re running my web application
hi to all forums members
can any one tell me what is error in mine code, It create every time a new cookie, but i have to write into existing cookie.
When i close my web application and re running my web application and, adding values into cookies it creates new cookies... why I m unable to understand....
following is my code...
protected void btnAddCokkie_Click(object sender, EventArgs e)
{
CreateAndAddCookiesValue();
}
private void CreateAndAddCookiesValue()
{
//Response.Cookies.Remove("ShowHistoryCookie");
if (Request.Browser.Cookies == true)
{
// Check the cookie Mycookie exist or not
if (Request.Cookies["ShowHistoryCookie"] == null)
{
// If does Mycookie does not exist then create the cookie
HttpCookie aShowHistoryCookie = new HttpCookie("ShowHistoryCookie");
Response.Cookies.Add(aShowHistoryCookie);
// set expires to the datetime maxvalue
Response.Cookies["ShowHistoryCookie"].Expires = DateTime.Now.AddMonths(1);
//Response.Cookies["ShowHistoryCookie"].Expires = DateTime.MaxValue; //DateTime.Now.AddMonths(1)
Response.Cookies["ShowHistoryCookie"]["URL"] += txtUrlLink.Text;
}
//Append UrlLink into existing cookie
else
{
string strCookie = Request.Cookies["ShowHistoryCookie"]["URL"].ToString();
string strCook = strCookie;
strCookie += "|" + txtUrlLink.Text;
char[] splitter = { '|' };
string[] arInfo = new string[10];
arInfo = strCook.Split(splitter);
int count = arInfo.Length;
int intResult=-1;
bool flag = false;
//count to Restrict cookie to Store 10 UrlLink
if (count <10)
{
//check to ensure that no duplicacy in UrlLink of cookies
foreach (string str in arInfo)
{
intResult = str.CompareTo(txtUrlLink.Text);
if (intResult == 0)
{
flag = true;
break;
}
}
if (flag==false)
{
Response.Cookies["ShowHistoryCookie"]["URL"] = strCookie;
}
}
//Sorting cookies to ensure that only ten recents Url link are added only...
else if (count >= 10)
{
foreach (string str in arInfo)
{
intResult = str.CompareTo(txtUrlLink.Text);
if (intResult == 0)
{
flag = true;
break;
}
}
if (flag == false)
{
for (int i = 0; i < 10; i++)
{
//Swaping
if (i + 1 >= 10)
{
arInfo[9] = txtUrlLink.Text;
break;
}
else
{
arInfo[i] = arInfo[i + 1];
}
}
strCookie = arInfo[0] + "|" + arInfo[1] + "|" + arInfo[2] + "|" + arInfo[3] + "|" + arInfo[4] + "|" + arInfo[5] + "|" + arInfo[6] + "|" + arInfo[7] + "|" + arInfo[8] + "|" + arInfo[9];
Response.Cookies["ShowHistoryCookie"]["URL"] = strCookie;
}
}
}
}
else
{
// Else display message that
// the browser does not accept cookies
Response.Write("This Browser does not accept cookies");
}
Vishnu Narayan Mishra
Software Engineer
|
|
|
|
|
Vishnu Narayan Mishra wrote: Cookies.Remove("ShowHistoryCookie");
One sensible thing to do in situations like this, is to define "ShowHistoryCookie' as a const string, and use that variable everywhere, so you never have to track down a typo anywhere and can easily change the value if you want to.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi could'nt understand your solution, my questions is so simple, can u try to straight answer my question..
Vishnu Narayan Mishra
Software Engineer
|
|
|
|
|
I'm sorry, I was trying to point out why your code is nasty and hard to read. Your question involved a ton of code, which was hard to read, and no comments on what you see when you debug the code, so I didn't really take the time to try to decipher it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,
I am new to asp.net hosting. I want to host my asp.net web page. Can any one tell me which hosting site is best for asp.net.
It is also nice, if the price is low...
Thanks in Advance
Senthil.S
Senthil S
Software Engineer
|
|
|
|
|
If you google ASP.NET hosting, you'll get all the info you can use.
I am using GoDaddy. They are OK.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
There are so many host hosting provider available that works on local areas you will find them even in your areas also that could provide the hosting in low prices but i think you should go for some good players like:- indiatimes
They provides the good hosting soluiton for windows and linux both platform and all the advance facilities require in the webhosting in the regionable price.
Now dicision is your and that want to pay to the local provider with lower facilities or to the big players which provides better solution and good facilities.
Yogesh Agarwal
|
|
|
|
|
I have heard great things about discount asp and godaddy.
_________________________________________________
Have a great day!!!
-- L.J.
|
|
|
|
|
Hi all,
I want the asp:menu control to work on click. By default it is working on mouse over. I got few button below the menu item and when the user is moving the mouse fast and trying to click the buttons below the menu, some time the menu is popped up and the user is clicking on the menu rather than on the mouse. It there any way I can make the menu work on click so, that I can avoid the user accidentally click on the menu.
Thanks in advance.
-Ram.
|
|
|
|
|
Odds are that you'll have to find your own javascript menu to find one that works on click. Or, examine the code that gets spit out and see if there's a way to change it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi
I have an ajax page for airplane checkin.when I want to choose seat location I have to use image checkbox and get the id of checkbox (seat location) by ajax,but when I use Graphical checkbox component the page post back and other java script checkboxes only support html checkboxes and when I set Run as server they dont have attribute for post back to handle by ajax.
any sujestion to get the value by js and fill in textbox!?
any codes?
thanx.
modified on Wednesday, March 5, 2008 12:40 AM
|
|
|
|
|
Hi Guys,
I am using ASP.Net VB Coding.
Does anyone of you knows how to detect changes from lowercase to uppercase or mixtures of lowercase and uppercase?
Example:
Textbox1.text = "Australia" was then changed to Textbox1.text = "AUstRALia"
Looking at the example it shows here that the user was doing some text changes from "Australia" to "AUstRALia".
Is there a way to check the changes of the textbox value?
Thanks in advance Guys
hifiger2004
|
|
|
|
|
If you simply want to check the individual characters of the input string on the server, then something like the below would do the trick:
<br />
Dim fEmptyBefore As Boolean<br />
<br />
For Each ch As Char In stringInput <br />
<br />
If [Char].IsWhiteSpace(ch) Then <br />
fEmptyBefore = True <br />
Else <br />
If [Char].IsLetter(ch) Then <br />
If [Char].IsLower(ch) AndAlso fEmptyBefore Then <br />
' We have a lower case letter at the start of a word<br />
Else If [Char].IsLower(ch) And Not fEmptyBefore Then<br />
' We have an upper case letter in the middle of a word<br />
End If<br />
End If <br />
<br />
fEmptyBefore = False <br />
End If <br />
<br />
Next<br />
You can then handle any instances where the casing is not as expected and take appropriate action.
If you wish to validate / check the input on the client then there are ways to do this using JavaScript, but it would depend on what it is you are trying to achieve as to how you would approach the problem.
Clean code is the key to happiness.
|
|
|
|
|
Yes I think this will help. What I am trying to do is to track the changes of a particular textbox in order to make the save button either enabled or disabled. And if the textbox value is "australia", then was changed to "AUSTRALIA" and then again was changed back to "australia" then in this case the save button should be in disabled state. Meaning nothing was changed.
Thanks
hifiger2004
|
|
|
|
|
The best way to achieve this would be to use regular expressions through JavaScript. When the page loads you would save a global variable, or hidden field, that contains the value of the TextBox and on every keystroke within the TextBox, call a JS funtion that uses RegEx to determine whether the current value is different from the original. The original value would be used in the compilation of the expression.
If you Google RegEx and JavaScript, there are plenty examples out there that will show you what is required. Basically, based on the result of the RegEx test you will get a boolean value telling you if the values are the same (case differences will be picked up) and you then enable / disable the Save button as required.
Clean code is the key to happiness.
|
|
|
|
|
Hi All,
I would like to get some ideas about for the java script as I am new to that area.
I'd like to set up a script which will get the control id which is being focused and according to the control id I'd like to set a different message to a text box.
If you have any link or ideas of your own, please share with me.
The logic is I will have like 6 or 7 controls on the page with a master page.(I am using MS AJAX)
When user changes the focus from control to control I would like to display the message in a text box.
Like...If the focus is on textbox 1 The message will be "this is text box 1".
And user changes the focus to textbox 2 , The message will be " This is text box2."
please give me a hand.
|
|
|
|
|
Hi, this can simply be achieved by utilising the onfocus and onblur DOM events that controls such as textboxes expose. To hook up your controls to these events you would do something like the following:
In your ASPX page:
<asp:TextBox id="textBox1" runat="server" onfocus="showMessage('This is textBox1');" onblur="showMessage('');" /><br />
<br />
<div id="messageHolder"></div>
In your JS file (or simply in a script block on your ASPX page)
function showMessage(message)<br />
{<br />
document.getElementById('messageHolder').innerHTML = message;<br />
}<br />
Clean code is the key to happiness.
|
|
|
|
|
Thanks for your help.
It works.
|
|
|
|
|
Hi,
I am developing a application, in which i have to fetch some records from a remote database through web service and then on basis of that data i have to insert some records in our local database and after that i have to mark the remote data that inserted into local db so that it does not comes again.
So in this process after inserting inot local DB if error occurred while doing updation on remote data, then process should be rollback.
that is the issue. I tried using Enterprise Services, but it didn't work, trnsaction won't get rollback.
Can it be possible using WCF?
Please help regarding that.
AKS
|
|
|
|
|
Hi ,
I am working with tree view in asp.net 2.0 .
I have 2 link buttons SelectAll and SelectNone.
Now how can i select all check boxes of treeview on click of my
SelectAll link button and vice-versa on SelectNone button.
Thanks in advance.
Regard,
Gourav Tyagi
|
|
|
|
|