|
Thank you for ur helping,but i need other's client IP Address,if they put print out it should print document and IP Address as well.
|
|
|
|
|
Hi
It will definately return Client's IP address..
But maybe it will return wrong IP where this site will hosted..
Just try access to access your page from some others browser..it will return correct static IP address of the machine!!!
try this ,if still confused then let me know..
trish
|
|
|
|
|
Hi
Yes it working when i'm trying in different solution,but there is small problem actuall i have Reports in one solution and my UI in another solution,so i put the parameter field into my report and i call that parameter from my ui as follows,
In my UI there is method call GetReport()
i have created object of my report document and i set it to it like this,
ReportDoc.MyreportName objectOfReport=new ReportDoc.MyreportName();
objectOfReport.setParameterValue("MyParameterName",Request.UserHostAddress);
but there occur error like this: System.Runtime.InteropServices.COMException: Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
what should i do?
thank you
|
|
|
|
|
Hi
Pls help me to do this,this is urgent
thank you
|
|
|
|
|
Hi,
I think you are using Crystal report for generating report..
Unfortunately I don't have crystal report installed on my PC..
But I search similar problem for you on net..try this link you may got the solution
http://forums.asp.net/thread/1003903.aspx
Trish
|
|
|
|
|
Hi
Im appreciate your helping,ok trish i solved that problem i did in diferrnt way.Thank you very much.
|
|
|
|
|
I have a server control that I have made. In it I am making use some strongly typed List properties tagged with [PersistenceMode(PersistenceMode.InnerProperty)]. The idea being that I can markup in my consuming page like
<cc2:GenericForm ID="GenericForm1 runat="server" ...>
<EmailRecipients>
<cc2:Emailrecipient Address="someone@somewhere.com" />
<cc2:Emailrecipient Address="someelse@somewhere.com" />
...
</EmailRecipients>
</cc2:GenericForm>
This works fine, in the sense that intelisense works perfectly and I am able to use the values and render my control perfectly at run time. However, if I look at the design surface I don't see my control as its supposed to be rendered. I see a gray box with a red error message that reads
"Error Creating Control - GenericForm1 'cc2:GenericForm' could bot be set on property 'EmailRecipients'."
How can I avoid this error box? I don't even really care if the control renders out fully or if it just renders a blank little gray box that says "GenericForm1" or something like that. I setup a designer class for this control, and overrode the GetErrorDesignTimeHtml method, but Visual Studio doesn't use it. I am not certian what is the pertinent code so here is a bit of it
Here is the property in my control class
private List<EmailRecipient> _EmailRecipients;
[PersistenceMode(PersistenceMode.InnerProperty)]
public List<EmailRecipient> EmailRecipients
{
get
{
if (_EmailRecipients == null)
_EmailRecipients = new List<EmailRecipient>();
return _EmailRecipients;
}
set { _EmailRecipients = value; }
}
And here is the EmailRecipient class itself.
public class EmailRecipient
{
private string _Address;
public string Address
{
get { return _Address; }
set { _Address = value; }
}
}
Thanks for your help.
|
|
|
|
|
hi,
can anyone tell me which site is good to refere(other than microsoft & codeproject) for ASP.NET 2.0 new controls like gridview,linkedlist, etc.,
i need some samples on this controls.
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
www.asp.net[^]
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
thanks alot. really very good site. now i am watching the vedios on .NET 2.0.
thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Well there are many sites:
http://www.gridviewguy.com/Articles.aspx
www.w3school.com
and many others....
|
|
|
|
|
Thanks alot
rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hello,
I have an ASPX file with this.
Default.aspx:
<asp:SqlDataSource ... >
<SelectParameters>
<asp:QueryStringParameter DefaultValue="<font color=FF0000>25</font>" Name="PageSize" QueryStringField="PageSize" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource> But I would like to replace it with something like this.
Default.aspx:
<asp:SqlDataSource ... >
<SelectParameters>
<asp:QueryStringParameter DefaultValue="<font color=FF0000><%= PageSize %></font>" Name="PageSize" QueryStringField="PageSize" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource> Default.aspx.cs:
public partial class Default : System.Web.UI.Page
{
public Int32 <font color=FF0000>PageSize = 25</font>;
...
} The key point being, that I want to use a variable (PageSize) from the code behind class as a parameter to the SqlDataSource control. But it doesn't work. Does anyone know what I'm doing wrong?
Thanks for any help!
|
|
|
|
|
You can't put a script tag inside a server control.
Put an ID on the control, and set the property of the control from code behind:
<asp:QueryStringParameter ID="PageSize" Name="PageSize" QueryStringField="PageSize" Type="Int32" /><br />
<br />
PageSize.DefaultValue = 25;
---
Year happy = new Year(2007);
|
|
|
|
|
Thanks, but I get this error message:
Parser Error Message: Type 'System.Web.UI.WebControls.QueryStringParameter' does not have a public property named 'ID'.
|
|
|
|
|
Should be <asp:QueryStringParameter ID="PageSize" Name="PageSize" QueryStringField="PageSize" Type="Int32" />
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
Thanks, because of your help I figured that I can do something like this in code behind:
SqlDataSource1.SelectParameters["PageSize"].DefaultValue = Convert.ToString( PageSize );
|
|
|
|
|
It won't work as a coding expression... but would it work as a databinding expression, using <%# ... %> syntax? Are databinding expressions evaluated in data source controls?
|
|
|
|
|
Hello All,
I'm trying to design a simple web site using a menu control that can
found at:
http://www.destinpipeline.com/default.htm
Is this an older way to do menu controls, and can this easily be done
in ASP.NET 2.0? Please provide any links to examples on how to do
this? If you also notice when you click on Capacity how the title
changes from Informational Postings to Capacity. I also need to figure
out how to do that as well.
Thanks
|
|
|
|
|
|
|
I don't have time to test out my theory, but I'm guessing that to do this in the html you would have to do it like this:
ImageURL=<%=Request.ApplicationPath & "/Images/image_file.gif"%>
Or some variation of this. Hope this helps.
|
|
|
|
|
Hey.
I have a site that allows users to upload images to a web server. I realise this could be very dangerous and so i wish to limit users to uploading jpegs.
The way I have of dealing with this is to read the header of the file - if it is correct then allow the file to stay else delete it. However I am unsure of any more vulnerabilities that may be present.
If any one has any experience in this and would like to offer advise i would be most grateful.
Cheers
Dan
|
|
|
|
|
Are you checking the MIME type? Are you limiting the file extensions to .jpg/.jpeg?
Jon Sagara
I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So i had to leave the place as soon as possible.
--Mr.Prakash
Blog | Site | Articles
|
|
|
|
|
Oh man that is hard. The jpeg format is somewhat flexible - there are vendor specific implementations so it is hard telling whether or not it is valid. Normally, you read the first few bytes and then compare them to specific combinations. If memory serves, the standard is to store the first 4 bytes as ff d8 ff e0.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|