|
Not really an ASP.NET question, but
http://msconline.maconstate.edu/Tutorials/JSDHTML/JSDHTML03/jsdhtml03-02.htm[^]
You're wrong, there is indeed a focus event on a textbox. Perhaps the issue is that you're looking at the server side events that are shown to you by intellisense, when you really want javascript client side events ?
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 )
|
|
|
|
|
I tried javascript, but the autocomplete does not provide handlers rather than those of server side.
So, I dealed with ASP.NET message board
Mohamed Gouda
Egypt
|
|
|
|
|
Yeah, like I said, autocomplete only shows server side stuff, you need to look for client side stuff yourself.
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 have a webpage which contains a Datagrid object. It's filled by the hits of the search you make in a textbox. When a row in the result datagrid is clicked, a pdf is being viewed inside the browser. Works fine. But... when you click the back button, the result of the search is lost! Instead you see the former search result.
Example:
I use a datagrid with pageindex. I make a search and gets three pages in the result datagrid. Initially I see the first page. I then click on the second page and then click on one of the search result-rows. The pdf is viewed. Then I hit the back button and I return to page 1 instead of 2!?
I've search through the entire internet for a solution... it's really driving me crazy!!
Can anyone help me?
/Martin
|
|
|
|
|
Why not show the PDF in a new window ? Or, when you change pages, put the page number on the URL and read it from there, so that it will restore
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 )
|
|
|
|
|
Thanks for your reply!
I really want to view the pdf in the same browser window. Is there no (easy?) way I can preserve the datagrid data (without putting the pagenr in the url)? Why isn't it there when I push the backbutton? Is the page not cached on my local computer? It's really weird, cause it works fine in firefox. To bad everyone is using IE!
Another thing...
I'm using Response.BinaryWrite to view the pdf (byteformat), which seems to overwrite the current browser view. When hitting the backbutton, the browser doesn't "remember" the former view, but throws me back to the page before the page (2 "steps" back) I want to view (hope you understand what I mean). Is there a way for me to create a blank page (within the browser), and then view the pdf on that page? That should allow me to go back to the former view when I push the back button...
/Martin
modified on Thursday, March 13, 2008 5:32 AM
|
|
|
|
|
Hi All;
I want to send sms through my web site but i have no idea about this plz i want help by toturial or links or books which display this problem from scratch to advanced.
i'm using ASP 2.0 and c#
i want to know from where i'll start to develop
Thank's for your attention
Kareem Elhosseny
modified on Thursday, February 28, 2008 4:09 AM
|
|
|
|
|
To send SMS, you need to communicate with a server that's plugged into the mobile phone network. Obviously. There are articles here on CP about doing this, but they have lots of comments about it not working, I think they may work in India only. Really, you need to find a provider, free or otherwise, you can use in your area.
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 )
|
|
|
|
|
Dear Christian
Thank's in all cases
i want to know from where i'll start ,
how can i establish a connection to mobile phonr network
and how can i find a provider .
Kareem Elhosseny
|
|
|
|
|
google - the provider will provide the way to connect, there's nothing built into .NET except for the base level stuff (like support for web services ) which such a provider will leverage to make you able to connect to their service
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 )
|
|
|
|
|
my dear ;
do u have any toturial taking about that or websites or any links books some things to help me
Kareem Elhosseny
|
|
|
|
|
elhosseny wrote: my dear ;
In English, this is a really creepy way to refer to somebody you don't know. Its the sort of thing you use to refer to your wife/husband!
elhosseny wrote: do u have any toturial taking about that or websites or any links books some things to help me
Have you tried searching google for a SMS provider in your country?
|
|
|
|
|
I'm sorry but i hope to make friends & try to make it in friendly way
sorry for this mistake
Kareem Elhosseny
|
|
|
|
|
If you don't understand what I've already said, you should probably give up. To reiterate: because these services seem to be somewhat localised, your best bet, as you know where you are, is to take the 30 seconds it will take to type something in to google yourself, and see what you get.
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 )
|
|
|
|
|
|
I need a code to generate a balloon tooltip text for server controls when user has pointed mouse over on the control. I dont want to use the .net tooltip property because it shows like box tool tip
i need like ballon model
Help me....
Gopinath.R
|
|
|
|
|
You need to use javascript. There is no built in control available AFAIK.
|
|
|
|
|
I m asking that's how? Let me know the javascript code?
Gopinath.R
|
|
|
|
|
I suspect it's quite involved, as it would involve a floating div with rounded corners. I suspect your best bet is to google for an article on 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 )
|
|
|
|
|
|
I want to use the 'AddAt' method with a dynamically generated repeater. It doesn't work. It's just like the whole repeater has only one item because i only can add an item 'before' or 'after' the whole repeater.
I use this ItemTemplate class
Public Class clsNavigatieDetail1ItemTemplate
Implements ITemplate
Private mboOpgevuld As Boolean
Private moRepeater As Repeater
Private msNavigatieDetail1 As String
Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn
Try
If Not mboOpgevuld Then
mboOpgevuld = True
Dim oDataTable As DataTable
oDataTable = CType(moRepeater.DataSource, DataTable)
For i As Integer = 0 To oDataTable.Rows.Count - 1
Dim sItem As String
sItem = "<div class='NavigatieMenuDetail1'>"
sItem += "<div class='divMenuCell3' class='NavigatieMenuDetail1'> </div>"
sItem += "<div class='divMenuCell4'>"
sItem += "<a href='javascript:doPostback();setNavigatieDetail1 (" + oDataTable.Rows(i)("IDSubNavigatie1").ToString + ");'>"
sItem += oDataTable.Rows(i)("OmschrijvingSubNavigatie")
sItem += "</a>"
sItem += "</div></div>"
Dim oLiteralControl As New LiteralControl
oLiteralControl.Text = sItem
container.Controls.Add(oLiteralControl)
Next
End If
Catch
End Try
End Sub
Public Sub New(ByVal oRepeater As Repeater, ByVal sNavigatieDetail1 As String)
mboOpgevuld = False
moRepeater = oRepeater
msNavigatieDetail1 = sNavigatieDetail1
End Sub
End Class
|
|
|
|
|
Hello all!
I am new to writing custom controls and have an issue with text box fields not persisting their values on post back. Here is an example of a class I wrote to demostrate my problem, I set the value of the textbox using javascript, however on postback the value disappears. How do I get around this?
Thanks in advance.
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
<br />
namespace TestControl<br />
{<br />
[DefaultProperty("Text")]<br />
[ToolboxData("<{0}:PersistText runat=server>")]<br />
public class PersistText : WebControl<br />
{<br />
Panel pnl = new Panel();<br />
<br />
[Bindable(true)]<br />
[Category("Appearance")]<br />
[DefaultValue("")]<br />
[Localizable(true)]<br />
public string Text<br />
{<br />
get<br />
{<br />
String s = (String)ViewState["Text"];<br />
return ((s == null) ? String.Empty : s);<br />
}<br />
<br />
set<br />
{<br />
ViewState["Text"] = value;<br />
}<br />
}<br />
<br />
protected override void CreateChildControls()<br />
{<br />
TextBox txtBox = new TextBox();<br />
txtBox.ID = "myTextBox";<br />
pnl.Controls.Add(txtBox);<br />
Button btn = new Button();<br />
btn.Text = "Assign";<br />
btn.Attributes.Add("onclick", "document.getElementById('" + txtBox.ClientID + "').value = 'my value'; alert('Value Set!');");<br />
pnl.Controls.Add(btn);<br />
}<br />
<br />
protected override void RenderContents(HtmlTextWriter output)<br />
{<br />
AddAttributesToRender(output);<br />
pnl.RenderControl(output);<br />
}<br />
}<br />
}
|
|
|
|
|
Because there's no code to move the text to your viewstate variable. Just get/set the text property of the textbox, and let the textboxes ViewState handle the rest.
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 )
|
|
|
|
|
ok, I am a noob at this!
something like this?
public string TextBoxText<br />
{<br />
get<br />
{<br />
return txtBox.Text;<br />
}<br />
<br />
set<br />
{<br />
txtBox.Text = value;<br />
}<br />
}
|
|
|
|