|
Why do you want to apply a CssClass to a string variable? If you are trying to show string (or text) with specific font size , apply the CssClass to the control through which you are displaying the string. (For e.g. a Label would serve the purpose)
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
that's the problem . it has to be applied to only part of the string which is text of a textbox.
|
|
|
|
|
Ok...I think you cannot do it using a normal TextBox...Probably the other way would be to write your own custom TextBox control and render the text as according to your requirement.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Hi,
You can assign your string value to a label and assign style sheet for that label ,...
hope this will help u...
|
|
|
|
|
Hi,
I have two website projects in vs 2008 and i need to integrate with these two projects
and i want session to be shared amoung the projects,
Is it possible in vs2008?
|
|
|
|
|
Ramesh A. wrote: I have two website projects in vs 2008 and i need to integrate with these two projects
and i want session to be shared amoung the projects,
Is it possible in vs2008?
What do you mean integrating ? Do you want to share session information between two web application?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
|
Read This[^] Article.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
as i know the session should be created at the server, and does it create a new session for each request that a browser requests(for each page it requests) or one session for one browser, means once the browser requested the first pg then web server creates a session and keep it until the browser closes or session expires.
|
|
|
|
|
Hi,
It does not create session on every request. Server creates session only once when you declare in your code and keep alive until you have kill it or close the browser.
krishna veer singh
|
|
|
|
|
Please Read[^] this article. This will resolve your query and you can also learn something new from it.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
tanx, but i'm experiencing that is confucing.i use a web service to server the web application. the problem is when user login i create the session
this.Session.Add("customer", customer.CUSTEMAIL);
then insert it to table (db) to restrict the same user log in.
in the log off method i use
customer.CUSTEMAIL = this.Session["customer"].ToString();<=====A
if (Customerinfo.delete_session(customer))
{
this.Session.Abandon();
return "log off successful";
}
else
{
return "log off failed";
}
to delete the record in the db and then destroy the session, but the prolem is when logging off at point A the session count is 0 means no session object and gives null ref exception, could you tell me what is going wrong here.
|
|
|
|
|
Hi,
Only one seesion value will be created
|
|
|
|
|
Hi friends...
Please help....
I have created a setup in VB.NET and installing in different machines. Now the problem is that the same setup is working on some machine fine, while same setup is not working. When i am trying to run the application its giving a message that "unable to find a version of the run time to run this application".
And also i want to tell you that all those machine having same configuration and same operating system, same anti virus.
Now please help me... i got frustrated with this kind of error.
krishna veer singh
|
|
|
|
|
krishnaveer wrote: I have created a setup in VB.NET and installing in different machines.
Are you talking about Web Setup or Application Setup ?
krishnaveer wrote: And also i want to tell you that all those machine having same configuration and same operating system, same anti virus.
Does all the system having .Net Framework?
if you want to run it all system, while building the setup,make sure in pre-requisite you have select .NET framework as pre install.
let me know if more issue.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Dear Expert,
I have Created a User Control Which Display the Match Fixture of the Football Game.
I Place this Control In the Repeator Control and Fixture Data is come from the Database.NOw I want to display that control as a slide show.Means One User control with one data at a time.all the help and suggestion are highly appreciated.
|
|
|
|
|
add the position attribute to the repeater control as relative and for the user control in Item Template add the position style attribute as absolute with left and top as 0.
Also make sure you give a zindex attribute in a progressive way. Then using client side javascript you can change the z-index to give a slide show effect.
e.g:
.
.
<asp:repeater id="myRepeater" runat="server" ....="" style="position: relative" xmlns:asp="#unknown">
.
.
.
<itemtemplate>
<uc1:[yourusercontrol]>
now use a javascript to get hold of the inner contents and change the zIndex attribute value.
Let me know if you need sample code.
Regards,
Cybernate
|
|
|
|
|
string str = "009810";
int _zip = Convert.ToInt32(str);
Now i am getting result as 9810. But i need it as 009810.
How can i get this? how can i convert this string to integer
G. Satish
|
|
|
|
|
You cannot store an integer value with a leading zero...Actually why do you want to do that?
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
modified on Tuesday, March 24, 2009 1:59 AM
|
|
|
|
|
Actually my string will be like this...
Mainstring = "009816-9234";
I am splitting this and taking part in to integer and add one value to it and then send as parameter to a query to check this in database.
i.e string str = "009816";
_zip = Convert.ToInt32(str);
_zip = _zip + 1;
ProcessthisinQuery(_Zip)
{
}
G. Satish
|
|
|
|
|
so how come it makes a difference ... i mean _zip now contains 9817. Whether 0009817 or 9817 both refer to a same value...
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
No, both are not same....
When i query like this...
Select * from Table Where Zip = '009817' Which gives results
But when i use the same query with zip = '9817'
Select * from Table Where Zip = '9817' Which doen't gives any results
The Data in the column contains with zip as 009817. So second query doen;t match
G. Satish
|
|
|
|
|
Ok got it...the zip column in your table is a non integer column like varchar or nchar etc. So when you pass '9817' its recognized as 9817 text not as 009817 and hence you are not getting the desired result.
For your problem after
_zip = _zip + 1;
Convert the _zip back to a string and pass it to the query... i mean
use the following...
-zip.ToString("000000") gives the value 009817. Now pass this value to your ProcessQuery(string zip) method as a string value.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Thank you for your answer, and have another doubt that the value is dynamic, i dont know, how many zeros will be in starting of the string..
Whether it will be '09817', '009817', '000817', '00081'
G. Satish
|
|
|
|
|
For that instead of using ToString("000000") use -zip.ToString().PadLeft(length,'0') ...where length can be the required number of digits...
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|