|
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 />
}
|
|
|
|
|
Yes, that's just what I meant. If the textbox doesn't have viewstate disabled, it will keep the text all by itself.
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 )
|
|
|
|
|
tried it, after clicking the button on post back the textbox value is blank again. Does this not have anything to do with the control being dynamically created again?
|
|
|
|
|
Oh - you're dynamically creating the control ? Why didn't you just add it to the ascx for your control ?
If you're creating the textbox in code, then it needs to exist prior to page load, or viewstate won't work, i.e. it won't be possible by any means to get the text that was entered.
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,
In the master page i need to read a value from the web.config file (key="PathLogout"). To read PathLogout i have placed a hiiden label <asp:Label ID="Label1" runat="server" style="display:none" Text="<%$ AppSettings:FreeAndClose %>"></asp:Label>
Inisde a javscript function i am reading it as follows:
var myVar = document.getElementById('<%= Label1.ClientID %>').innerHTML;
alert(myVar);
an error is generated "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Any ideas why and how can i solve it.
|
|
|
|
|
samerh wrote: ="<%$ AppSettings:FreeAndClose %>">br mode="hold" />
I think you want =, not $. The syntax with the colon looks wrong, too ?
One way to solve it, is to set the value of the textbox in your code behind. A more sensible way would be to write something like
var MyVar = '<%=AppSettings:whatevert%>';
and leave your textbox out of 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 )
|
|
|
|