|
No, I've checked this for you
Google Replied: Results 1 - 10 of about 10,700,000 for ajax examples. (0.27 seconds)
Antoine de Saint-Exupery: Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
|
|
|
|
|
Of course Goolge isn't broken, I was directing it at the OP ID 10 T I know the language. I've read a book. - _Madmatt
|
|
|
|
|
It was, in fact a joke (hence the smiley), reinforcing the fact he hadn't even bothered to google.... Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
|
|
|
|
|
hi, Im going to resolve requested url, and catch related query string (request) from url
for example when client try to redirect to www.mysite.com/myname, it change to www.mysite.com/?page=myname
exactly no page exist named myname
Response.Request["page"] return Query String i know , but the url must be formatted struct.modified on Saturday, February 13, 2010 6:32 PM
|
|
|
|
|
Could you please elaborate what exactly you are looking for?
|
|
|
|
|
|
|
Thanks a lot, i really need this.
|
|
|
|
|
<asp:EntityDataSource ID="srcCity" runat="server" ContextTypeName="Namespace.Core.Tracking.Domain" EntitySetName="Cities"
EntityTypeFilter="City" Include="Country" AutoGenerateWhereClause="true"/>
<WhereParameters/>
<asp:QueryStringParameter Name="Country.ID" Type="Int32"
QueryStringField="CountryID" />
</WhereParameters>
</asp:EntityDataSource>
<asp:EntityDataSource ID="srcCountry" runat="server" ContextTypeName="Namespace.Core.Tracking.Domain"
EntitySetName="Countries" EntityTypeFilter="Country" OrderBy="it.Name"/>
<asp:GridView ID="grid" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="srcCity">
<MasterTableView DataSourceID="srcCity" EditMode="InPlace">
<asp:TemplateField>
<asp:Label ID="lblName" runat="server"
Text='<%# Eval("Country.Name") %>'/>
</asp:TemplateField>
<EditItemTemplate>
<asp:DropDownList ID="lstCountry" runat="server"
SelectedValue='<%# Eval("ID") %>'DataSourceID="srcCountry"
DataTextField="Name" DataValueField="ID"
AppendDataBoundItems="true">
<ListItems>
<asp:ListItem Text="" Value="" />
</ListItems>
</DropDownList>
</EditItemTemplate>
</MasterTableView>
</GridView>
public partial class City : System.Web.UI.Page{
protected void Page_Load(object sender, EventArgs e){
grid.RowCreated += new GridViewRowEventHandler(grid_RowCreated);
}
void grid_RowCreated(object sender, GridViewRowEventArgs e){
if (e.Row.DataItem != null){
var city = EntityDataSourceExtensions.GetItemObject<City>(e.Row.DataItem);
if(city.Country != null)
(grid.FindControl("lstCountry")as DropDownList).SelectedValue = city.Country.ID.ToString(); <-- Here I got Exception
}
}
}
public static class EntityDataSourceExtensions {
public static TEntity GetItemObject<TEntity>(object dataItem) where TEntity : class {
var entity = dataItem as TEntity;
if(entity != null)
return entity;
var td = dataItem as System.ComponentModel.ICustomTypeDescriptor;
if(td != null)
return (TEntity)td.GetPropertyOwner(null);
return null;
}
}
C# Developer-- Modified Sunday, February 14, 2010 3:22 AM
modified on Sunday, February 14, 2010 3:39 AM
|
|
|
|
|
Please apply proper formating for your code before posting.
Developers generally hate to see the code without proper formatting and hence
your post might be ignored by a lot of members.
|
|
|
|
|
OK,ok, I've done it...
but nobody wantede help
C# Developer
|
|
|
|
|
Hi, I have a problem similar to this post:
http://www.microsoft.com.nsatc.net/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.office.developer.vba&tid=6fc07fd9-3313-4c09-9457-f6971ecafda4&cat=en_US_9477b478-d551-48fe-b931-e0d7ed05ac44&lang=en&cr=US&sloc=&p=1
In this post the original poster has written his code in VB whereas I have written my code in C#
My code for uploading a file:
protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.PostedFile.ContentLength>0)
{
string filename = Path.GetFileName(FileUpload1.PostedFile.FileName);
string storagepath = "D:\\Test\\" + filename;
int contentLen = FileUpload1.PostedFile.ContentLength;
Byte[] data = new Byte[contentLen];
FileUpload1.PostedFile.InputStream.Read(data, 0, contentLen);
savefiletodatabase(data);
FileUpload1.SaveAs(storagepath);
}
}
private void savefiletodatabase(byte[] data)
{
SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
try
{
SqlCommand command = new SqlCommand("INSERT into dbo.test ([file], [filename], [path]) VALUES (@data, '" + FileName + "', '" + FilePath + "')", connection);
command.Parameters.AddWithValue("data", data);
connection.Open();
command.Connection = connection;
command.ExecuteNonQuery();
}
catch (Exception ex)
{
throw ex;
}
finally { connection.Close(); }
}
The code to retrieve file goes here:
protected void LinkButton1_Click(object sender, EventArgs e)
{
getfile();
}
private void getfile()
{
SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
try
{
SqlCommand command = new SqlCommand("Select [file] FROM dbo.test where id='" + Id + "'", connection);
SqlDataReader reader;
connection.Open();
command.Connection = connection;
reader = command.ExecuteReader();
if (reader.Read())
{
byte[] data = (byte[])reader[0];
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment;filename=" + TextBox2.Text);
Context.Response.BinaryWrite(data);
}
}
catch (Exception ex)
{ throw ex; }
finally
{
connection.Close();
}
}
I am giving You the table structure here:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[test](
[file] [varbinary](max) NULL,
[filename] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[path] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[id] [int] IDENTITY(1,1) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
please help me out;
also when I uploaded a file to the database it was of 18041 bytes, but when I retrieved it after saving on desktop the size was 19,756 bytes which is increased?Thanks
Shankbond
|
|
|
|
|
shankbond wrote: also when I uploaded a file to the database it was of 18041 bytes, but when I retrieved it after saving on desktop the size was 19,756 bytes which is increased?
I think you need to clear the response using Response.Clear()
It's very important not to use string concatenation to make sql statements. Use parameterized queries instead.
|
|
|
|
|
Hi,
hspc wrote: I think you need to clear the response using Response.Clear()
I did but it does no effect on the size.Thanks
Shankbond
|
|
|
|
|
how to embed a 3rd party vedio conferencing software in asp.netcode?
is it possible in .net3.5?
can anybody suggest me any 3rd party tool for vedio conferencing?
plz its very urgent........
|
|
|
|
|
Which Third party control do you want to embed ?
|
|
|
|
|
any best video conference tool..........
what i need is that user can use that vedio conference from website.
|
|
|
|
|
|
hi,
When i change source of page then designer appears empty as a blank page that no control added to, so i can't change any source ...
thnaks in advance
|
|
|
|
|
right click on page and select convert to webapplication. it will regerate your designer page
Regards
Keyur Satyadev
|
|
|
|
|
thanks , but on right click menu there is no item named convert to web application, this problem accours on user web controls,aspx pages runs normally
|
|
|
|
|
<a id="A1" name="SelectZip" href="javascript:void(0);" onclick="javascript:SelectZip('<%=txtvDemoZip.ClientID%>',
'<%=txtvDemoCity.ClientID %>','<%=txtvDemoState.ClientID %>');"style="vertical-align: middle; font-size: 10pt; color: #4878a9; font-family: Arial; cursor:hand;text-decoration: underline;">Zip</a>
<iframe src="../../../../asps/DummyPage.htm" name="frmzip" id="frmzip" frameborder="0" style="vertical-align: top; text-align: center; width: 0;" marginwidth="0" marginheight="0"scrolling="auto" height="0" tabindex="-1"></iframe>
function SelectZip(txtZipCode,txtCity,txtState)
{
if (document.getElementById(txtZipCode).value == "")
{
alert('Please Enter Zip Code.');
document.getElementById(txtZipCode).focus();
return;
}
else if(document.getElementById(txtZipCode).value.length <5 &&document.getElementById(txtZipCode).value.length > 0 )
{
alert('Please Enter Zip Code.');
document.getElementById(txtZipCode).focus();
return;
}
else
{
strZipp=document.all(txtZipCode).value;
strcity=document.all(txtCity).value;
strstate=document.all(txtState).value;
// document.all("frmzip").src = "frameZip.aspx?cri=" & strZipp & "&vstate=" & strstate & "&vcity=" & strcity & "&From=Registeration" & "&txtCity=" & txtCity & "&txtState=" & txtState;
document.getElementById('frmzip').src = "frameZip.aspx?cri=" + strZipp + "&vstate=" + strstate + "&vcity=" + strcity + "&From=Registeration" + "&txtCity=" + txtCity + "&txtState=" + txtState;
// window.frames("frmzip").location.href = "frameZip.aspx?cri=" + strZipp + "&vstate=" + strstate + "&vcity=" + strcity + "&From=Registeration" + "&txtCity=" + txtCity + "&txtState=" + txtState;
// var URL = "frameZip.aspx?cri=" + strZipp + "&vstate=" + strstate + "&vcity=" + strcity + "&From=Registeration" + "&txtCity=" + txtCity + "&txtState=" + txtState;
}
document.getElementById(txtZipCode).scrollIntoView(true);
}
you can see how many ways i have tried but none worked even i tried to call the function on Href but still no luck. when zip link is clicked it opens a popup which is iframe. it works in IE but firefox no luck yet. Help me out
thank you
Kamran Pervaiz
Asst. Software Engineer
|
|
|
|
|
IFrames are evil. Don't expect them to work in anything but IE.
The ASP.Net way to solve it would probably be something with a asp:Panel with appropriate CSS to layer it on top of everything possibly inside an asp:UpdatePanel. You could create your own, or you could implement the ModalPopupExtender from the Ajax Control Toolkit[^]
|
|
|
|
|
hi guys, do you know of any free sample/implementation of this in .aspx?
http://www.labsmedia.com/clickheat/index.html
http://www.clickdensity.com/
thanks for any info.
|
|
|
|
|
Hi,
i have browse locally in iis.
but it not getting to connect.
its showing error like...
"Failed to access IIS metabase"Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|