|
Stopped the anti-virus on my machine.
Now the error I get is:
{"Mailbox unavailable. The server response was: 5.7.1 Unable to relay for jo.bloggs@data.org.uk"}
|
|
|
|
|
using Net.WebClient can able to send sms throw web service?
its working when use the code at asp.net, but @ web service it not working.
may i know the reason if any one knows?
thx
raj
raj
|
|
|
|
|
Standard Question #1:
What do you mean by "Not working"?
Also, a bit of English help:
"throw" should have been "through"
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
i am getting error called "The page cannot be displayed". not able to receive the sms as well.
raj
|
|
|
|
|
Fist, you have to make sure your webservice's supplier work???
you can contact to get support from them
<< >>
|
|
|
|
|
I found the bug, now working fine…
Thanks
raj
|
|
|
|
|
Hi,
There is a requirement to be able to upload files using a website (asp.net 2.0) . There should be a kind of validation on these files before the upload is allowed. What I am not sure of is how can I do any kind of validation on the files before the upload? For example if a file of type excel or .txt is to be uploaded, the website has to first check to see if there are certain data in the file... then if all ok the upload is allowed.
Thanks
|
|
|
|
|
You will have to uploda the file to the server first and do the checking there. If the checking fails simply delete the file.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I guess I can let the user know what the problem was?
Thanks
|
|
|
|
|
Why not?
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Well... you can use Javascript to at least check the file extension - this doesn't guarantee the file is valid, of course, but it will help eliminate some innocent errors....
If you have a file input box on your form
<input id="file1" type="file" onchange="checkFile(this)" name="file1">
You can use the following function - change the line
var fileTypes=["gif","jpg","jpeg"];
to suit whatever file extensions you want to check for.
function checkFile(what){
var source=what.value;
var ext=source.substring(source.lastIndexOf(".")+1,source.length).toLowerCase();
// valid file types
var fileTypes=["gif","jpg","jpeg"];
for (var i=0; i<fileTypes.length; i++) if (fileTypes[i]==ext) break;
if (i==fileTypes.length) {
alert("THAT IS NOT A VALID FILE\nYou can only uload files with the following extensions:\n\n"+fileTypes.join(", "));
}
}
// -->
</script>
This script was adapted from one I downloaded from
The JavaScript Source!! http://javascript.internet.com
and the original was created by Abraham Joffe : http://www.abrahamjoffe.com.au/
They would probably appreciate your adding such comments to this script if you use it on a web-page.
cheers
Phil
-- modified at 4:26 Wednesday 26th April, 2006
|
|
|
|
|
Hi there,
Do you mean that you have to read the file's content to validate at client-side before uploading? if so, you upload file to server and validate at server-side. You dont have permission to read file at client
<< >>
|
|
|
|
|
|
|
For Print
1. window.print()
THis will print whole page
2. Give Link Print on click of which it will open IE popup using window.open()
which only contains grid control having same result and in that popup give print button on click of which it will print whatever there in the popup means as per our logic only grid with result.
You can hide print button using document.form.btnPrint.style.visiblity = hidden
OR
objBtn = document.getElementById(btnPrint)
objBtn.style.display = 'none'
|
|
|
|
|
hi
Ihave uninstall Microsoft IE WebControls and install ComponentArt still i didnt get any license key and performed a small program while compiling i get the following error
componentart_webui_client/2006_1_1208/A573G988.js not found
I am trying to search but in vain what exaclty this js file is .Can anyone who has worked with ComponentArt can explain me what went wrong.
When I can get the key I am using this coponent as trial basis .Please Guide me
thanks in advance
sasi
|
|
|
|
|
|
hai everyone
i m ajay.
i m facing a problem related to creating a textbox in template column of a datagrid at runtime.i am giving my code snippet.although when i m taking a label instead of textbox it works fine.but when i m dealing with a textbox it gives me the error
"Control '_ctl0__ctl2_lbl1' of type 'TextBox' must be placed inside a form tag with runat=server."
my coding is------
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data
Imports System.Data.SqlClient
Public Class WebForm1
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Template()
End Sub
Private Sub Template()
Dim DataGrid1 As New DataGrid
DataGrid1.AutoGenerateColumns = False
DataGrid1.GridLines = GridLines.Both
DataGrid1.BackColor = Color.Pink
DataGrid1.BorderWidth = Unit.Pixel(2)
DataGrid1.BorderColor = Color.Blue
DataGrid1.HeaderStyle.BackColor = Color.Yellow
DataGrid1.HeaderStyle.ForeColor = Color.Brown
DataGrid1.HeaderStyle.Font.Bold = True
DataGrid1.CellPadding = 10
Dim Field1 As String
Dim Field2 As String
Dim Header1 As String
Dim Header2 As String
Field1 = "name"
Field2 = "description"
Header1 = "Name"
Header2 = "Description"
Dim tempcol As New TemplateColumn
'Dim tbc As New MyTemp(ListItemType.Item, Field1, Field2)
'tempcol.ItemTemplate = tbc
' Header Template
tempcol.HeaderTemplate = New MyTemp(ListItemType.Header, Header1, Header2)
' Item Template
tempcol.ItemTemplate = New MyTemp(ListItemType.Item, Field1, Field2)
' Add Template into Grid
DataGrid1.Columns.Add(tempcol)
' Binding Data Source
Dim cnn As New SqlConnection("")
Dim da As New SqlDataAdapter("")
Dim ds As New DataSet
da.Fill()
DataGrid1.DataSource = ds
DataGrid1.DataMember = ""
DataGrid1.DataBind()
' Bind Grid into Label
' Me.lblShowGrid.Controls.Add(DataGrid1)
Page.Controls.Add(DataGrid1)
End Sub
End Class
Public Class MyTemp
Implements ITemplate
Dim TemplateType As ListItemType
Dim Field1 As String
Dim Field2 As String
Sub New(ByVal type As ListItemType, ByVal fld1 As String, ByVal fld2 As String)
TemplateType = type
Field1 = fld1
Field2 = fld2
End Sub
Sub InstantiateIn(ByVal Container As Control) Implements ITemplate.InstantiateIn
'Dim lbl1 As New WebControls.TextBox
Dim lbl1 As New TextBox
lbl1.BackColor = Color.Beige
Dim lbl2 As Label = New Label
Dim lc1 As LiteralControl = New LiteralControl
Dim lc2 As LiteralControl = New LiteralControl
Select Case TemplateType
Case ListItemType.Header
lc1.ID = "textbox1"
lc1.Text = Field1
Container.Controls.Add(lc1)
lc2.ID = "lc2"
lc2.Text = Field2
Container.Controls.Add(lc2)
Case ListItemType.Item
lbl1.ID = "lbl1"
AddHandler lbl1.DataBinding, AddressOf BindIntegerColumn
Container.Controls.Add(lbl1)
lbl2.ID = "lbl2"
AddHandler lbl2.DataBinding, AddressOf BindStringColumn
Container.Controls.Add(lbl2)
End Select
End Sub
Sub BindIntegerColumn(ByVal Sender As Object, ByVal e As EventArgs)
Dim lbl1 As New TextBox
lbl1 = CType(Sender, TextBox)
Dim Container As DataGridItem = CType(lbl1.NamingContainer, DataGridItem)
lbl1.Text = DataBinder.Eval(Container.DataItem, Field1)
End Sub
Sub BindStringColumn(ByVal sender As Object, ByVal e As EventArgs)
Dim lbl2 As Label = CType(sender, Label)
Dim Container As DataGridItem = CType(lbl2.NamingContainer, DataGridItem)
lbl2.Text = DataBinder.Eval(Container.DataItem, Field2)
End Sub
End Class
thanx in advance
any suggetion will be highly appriciated
ajay
|
|
|
|
|
Me.lblShowGrid.Controls.Add(DataGrid1)
Page.Controls.Add(DataGrid1)
Because you add the grid control to the Page, so the grid and its child controls inluding the textbox will be placed outside the form element, and you will get the error. Instead, you should get reference to the form element, and add the grid to the Controls collection of the form. Another option is to place a container like Panel or PlaceHolder control in the form, and add the grid to this container.
|
|
|
|
|
I used Google Web Service to do web search, and I have already succeed to use Google Web API to do that in the same web page. But my problem is that how does the search result returned and open a new web page to show these records.
Please give me some guide. I will appreciate your teaching. Thank you.
HI!
volunteer0706@yahoo.com.tw
|
|
|
|
|
There are two options come to mind:
+ You open the new page and pass the search parameter to this page, the new page is responsible for calling the search APIs and displaying the result.
+ You use the current page to call the search APIs, then persist the result somewhere for example in the Session, and open the new page. The new page should be able to access the persisted result so that it can display on the web page.
Just some ideas.
|
|
|
|
|
Hi..
I have visual studio 2003 and I am trying to use Google Search Web Service(C#).But I got the error:
DataBinder.Eval: 'EProjects.googleapi.ResultElement' does not contain a property with the name title.
The source code of the Web Form that should display the Google Search Results:
using googleapi;
/// <summary>
/// Summary description for GoogleResults.
/// </summary>
public class GoogleResults : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.ImageButton imgPrev;
protected System.Web.UI.WebControls.ImageButton imgNext;
protected System.Web.UI.WebControls.DataList lGoogle;
public EProjects.googleapi.GoogleSearchResult gsR;
public EProjects.googleapi.GoogleSearchService gcs;
private void Page_Load(object sender, System.EventArgs e)
{
gcs=new googleapi.GoogleSearchService();
gsR=gcs.doGoogleSearch(licenceKeyString,Request.QueryString["Query"],
0, 1,true, "", true, "", "", "");
PopulatelGoogle(gsR);
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
///Required method for Designer support - do not modify
///the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void PopulatelGoogle(GoogleSearchResult gsR)
{
lGoogle.DataSource=gsR.resultElements;
lGoogle.DataBind();
}
}
}
The HTML code of the same page:
<table height="100%" width="100%">
<tr>
<td colSpan="2">
<asp:datalist id="lGoogle" runat="server">
<ItemTemplate>
<span style="font-size:17px;font-weight:bold;">
<%#DataBinder.Eval(Container.DataItem,"title")%>
</span></br>
<%#DataBinder.Eval(Container.DataItem,"snipper")%>
</br> <a href='<%#DataBinder.Eval(Container.DataItem,"URL")%>'>
<%#DataBinder.Eval(Container.DataItem,"URL")%>
</a>
</ItemTemplate>
<SeparatorTemplate>
</p>
</SeparatorTemplate>
</asp:datalist></td>
</tr>
<tr>
<td align="left"><asp:imagebutton id="imgPrev" Runat="server"></asp:imagebutton></td>
<td align="right"><asp:imagebutton id="imgNext" Runat="server"></asp:imagebutton></td>
</tr>
</table>
I tried to solve this problem for a long time but I couldnt please help.
I am too late but i will never give up
|
|
|
|
|
hi
can anybody tell the difference between configSource and file attributes in web.config file
coolsweety
|
|
|
|
|
+ The file attribute specifies an external file containing custom settings like you do in the appSettings entry of the web.config file. Meanwhile, the external file specified in the configSource attribute contains the settings for the section which you declare the configSource for. For example, if you use the configSource attribute of the pages section, then the external file will contain the settings for the pages section.
+ The custom settings declared in the external config specifified in the file attribute will be merged with the settings in the appSettings section in the web.config file. In the meanwhile, the configSource does not support merging, it means that you'll have to move the entire section settings into the external file.
|
|
|
|
|
thanx very much
coolsweety
|
|
|
|