|
use substring of first word to get first 3 letter.
cheers,
Abhijit
Think Sharp | Code Sharp | C Sharp
|
|
|
|
|
try this.
string str = "This is a test.";
str = str.Substring(0, 3);
|
|
|
|
|
Thanks, that is what I did
cheers!
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
I dynamically created an image (imageA), what I require is onclick event another image (imageB) should display and save the imageA id in string (which later I store in a dataset).
My question is how do I change and save the imageA id? , JavaScript can handle onclick event but don’t know how it handle in <asp:placeholder>
Here is a code
default.aspx
<asp:PlaceHolder runat="server" ID="image_placeholder"></asp:PlaceHolder>
default.aspx.vb
Dim imageA As System.Web.UI.WebControls.Image = New System.Web.UI.WebControls.Image()
imageA.ID = "imageA"
imageA.ImageUrl = "Box1.gif"
image_placeholder.Controls.Add(imageA)
Thanks In Advance
|
|
|
|
|
i have a web site there are lot of pages.
one page name home.aspx
when i run the site in localhost.
write in : http://localhost/home.aspx
i want to write http://home then open my home page
how it is possible.
|
|
|
|
|
It shouldn't be possible. In order to display a webpage within a browser, it will have to know two things:
1) What page do you want
2) Where is that page
"Home.aspx" is the name of the page. "Localhost" is the place where that page resides.
"Localhost" is the domainname for your local computer. You could change that in the hosts-file, to get something like "http://mycomputer/home.aspx".
You could also set the default page to "home.aspx", that's a setting in IIS. That would give you an address like "http://mycomputer/".
|
|
|
|
|
Hello Friends
I want to give user a option to write down in the drop down list .
Details :
Suppose there are categories in the drop down
like CAT-A , CAT -B , CAT -C and so on
if the user wants to create another category he will type it in the drop down list and click on the button
Please tell me whether it is possible or not if possible please tell me how to do this
thanks and regards
Sindhu Tiwari
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Surely the better way would be to just have a textbox and then let the user write down their info into that and then update the database that way.
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
Telerik has a combo box in its rad controls. They cost about $1000 per person.
I didn't get any requirements for the signature
|
|
|
|
|
you can do it but make your own control that just look like notmal drop down.
|
|
|
|
|
how use Timer Control in asp.net
|
|
|
|
|
Use Ajax to use timer control
|
|
|
|
|
i was try but not work. please give me example.
|
|
|
|
|
AjAX Toolkit[^]
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
Timer controls work well on an asp.net page. As a web page refreshes each time it is back, You should declare the time control as a static attribute of the page, as well as the timer event handler.
protected System.Timers.Timer timer1; <br />
private int test; <br />
<br />
protected void Page_Load(object sender, System.EventArgs e) <br />
{ <br />
test = 1; <br />
<br />
timer1.Interval = 1000; <br />
timer1.Start(); <br />
<br />
timer1.Enabled = true; <br />
<br />
} <br />
<br />
<br />
<br />
private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) <br />
{ <br />
<br />
test = test+1; <br />
<br />
lblCounter.Text = "count:"+test; <br />
<br />
} <br />
<br />
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Vri SSK wrote: Timer controls work well on an asp.net page.
No, they really don't. In your example every user will have the same timer
A javascript timer will work, such as the one within the AJAX Toolkit.
Please consider your answer to questions before posting them, if you're unsure its probably better to not bother posting.
|
|
|
|
|
J4amieC wrote: f you're unsure its probably better to not bother posting
I'm never 100% sure..
..even an answer that isn't 100% can give you a pointer in the right direction. Sometimes such an answer becomes the base for an entire discussion. It does happen that we generate an adequate answer as a group, because we interact.
FWIW; you can make the code user-specific
|
|
|
|
|
eddyvluggen wrote: ..even an answer that isn't 100% can give you a pointer in the right direction.
And a stupid answer like the one given can lead you down the garden path, round the block and back again. In addition, im 99% sure the OP wanted a timer on the client not the server. He may not have specified that, but after years of answering questions on forums like CP, you can generally tell.
eddyvluggen wrote: FWIW; you can make the code user-specific
Not with a static Timer you cant. You may wish to read up on the static keyword.
|
|
|
|
|
J4amieC wrote: You may wish to read up on the static keyword.
Will do. I assumed that the component is simply shared among the users. Am I mistaken?
J4amieC wrote: And a stupid answer like the one given can lead you down the garden path, round the block and back again.
Thanks for the warning
|
|
|
|
|
One problem I found on the timer control is that if I had code running on page load and the timer was set to update say eevry minute the code on the page load would run as well.
This is a big drawback if you are using postback scripts etc
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
how to filtered textbox
i want to put only valid char suppose (a-z,0-9)
please just send me the solution.
|
|
|
|
|
Try using a regex validator to check chars.
|
|
|
|
|
Hello,
U can assign a regularexpression validator to the text box.
regularexpression can be "^[a-zA-Z0-9]$"
try this.
|
|
|
|
|
Hello, You can check on client side also.
using textchanged event of that textbox.
call a function on textchange and on the function check the keychar
if it is within your range then text will be added otherwise it return false, means character not appended on that textbox. Only valid char will appears.
Try to make a javascript function..
Best of luck.
Dipak
|
|
|
|
|
Just check this link...
I am saying this type of code..
http://www.w3schools.com/jsref/jsref_onkeydown.asp
Try it out.
Dipak
|
|
|
|