|
Start here[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
I am Hosting a web site and i want my clients pc's ip address and pc name in my website's server side vb.net code i tried code of [REMOTE_ADDR] and System.Net.IPAddress(.AddressList(0).Address)but it returns the server address i want clients pc name and address
please help me
Devang Vaja
|
|
|
|
|
You already have your answer in QA. No need to cross post.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Can Any One tell me how to convert .Rdlc report file to .rdl file
|
|
|
|
|
Yes[^]. For future reference, if something's urgent to you, you might want to consider researching the topic yourself. That way you don't waste time waiting for someone to happen by and give you an answer.
|
|
|
|
|
Any Tool for this??????????
|
|
|
|
|
I'm not sure what you mean. The SQL Server Report Viewer is the tool for converting between the two. Do you mean that you need a different reporting mechanism?
|
|
|
|
|
Hi All,
I have an asp.net 3.5 application which is using Entity Framework 1.0, I have a lot of tables with primary key column. But I have few tables which dont have primary or foreign key constraints.
When I generated edmx using Wizard, entity frame is writing update insert mechanism. But the other not non primary key and foreign key tables, I am unable to perform DML operations.
Can anybody please help me is there any way to select an option in the Wizard to have insert and update methods for those non primary key tables also. If there is no option in the wizard, whats the other way round to solve this issue.
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Hello all I had posted this question in the wrong forum and was asked to move it here.
I'm trying to download a file from a folder on the server but I don't know how to parse the path inside of the HREF attribute of the anchor tage. I'm trying to modify the following code to be used with HTML anchor tag:
protected void Page_PreRender(object sender, EventArgs e)
{
DataTable dt = new DataTable("INFO");
dt.Columns.Add("url", typeof(string));
string[] fileEntries = Directory.GetFiles(Server.MapPath("~/Documents/"));
dt.Rows.Add("~/Documents/" + Path.GetFileName(fileName));
grid.DataSource = dt;
grid.DataBind();
}
I wanted to do something like the following on my Page.aspx file:
<a href="~/Documents/" + Path.GetFileName(fileName)"> DOWNLOAD </a>
However, the above cannot be done. Please help me find and alternative, thanks in advance for your help.
|
|
|
|
|
Modify it like
protected void Page_PreRender(object sender, EventArgs e)
{
DataTable dt = new DataTable("INFO");
dt.Columns.Add("url", typeof(string));
string[] fileEntries = Directory.GetFiles(Server.MapPath("~/Documents/"));
foreach (string f in fileEntries)
{
DataRow dr = dt.NewRow();
dr["url"] = "<a href='~/Documents/" + Path.GetFileName(f) + "'> DOWNLOAD </a>";
dt.Rows.Add(dr);
}
grid.DataSource = dt;
grid.DataBind();
}
|
|
|
|
|
Hum Dum wrote: dr["url"] = "<a href='~/Documents/" + Path.GetFileName(f) + "'> DOWNLOAD </a>";
That just posts a string as the anchor tag, and doesn't resolve the ~ . That's the bit he needs help with.
|
|
|
|
|
|
Try replying to the OP, rather than me. He won't get emailed about answers to me.
|
|
|
|
|
Hi,
I have an ASP.Net application which is using, .ashx page, it has some methods (right now they are static methods, but I dont want them to be static). Is there any mechanism to call these methods from javascript or ajax calls which is written in a completely different html page.
We are able to call those methods if they are static, but I want those methods to be non-static.
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Why do you feel that a generic handler needs to be non-static in your case. I think that the more likely that you need to rethink the process you are attempting to use.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Its a Requiredment, i have a asmx service that returns a list<dataset> and the schema defination keeps on repeating foreach dataset in the List.
How can i prevent.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Hi,
I want to execute
1. Session Handling Code,
2. ThreadCulture Initialization
for all the WebMethods.
I would call the Webmethods thru AJAX/Jquery Call, and for all these type of calls, the above mentioned 2 steps must be executed.
I read about "Extending WebMethod Attribute". I want to know what are the other possible options to achieve this.
Also nif anyone has achieved this with "Extending WebMethod attribute", then pls share it.
Thanks
Santhosh Natarajan
|
|
|
|
|
|
Thanks for your post.
1. "Session Handling Code" which I wanted to integrate with all the web methods are my own session handling code for session timeout.
2. "Setting up thread culture" is again i must do the same way.
so what i exactly need is 1. HandleSessionTimeOut()
2. SetThreadCulture() must be called automatically for all the web methods in my .asmx
I don't want to write the method call manually in 50 webmethods which i have.
EnableSession is set to TRUE for my webmethods.
I hope you got my question.
Thanks again.
|
|
|
|
|
I'm learning ASP.NET 4.0 via 70-515 (using VS 2010 Professional). When I refer in the Page_Load event, of the MasterPage, to a existing control (Label 'GreetingLabel' which is accessible via intellisense) the compiler starts complaining about:
The name 'GreetingLabel' doesn't exist in the current context?? (The Label is on the MasterPage and within Page_load event it should be possible to use a reference tot this control). How can I fix this basic problem? Or is my .Net 4 corrupt or something?
|
|
|
|
|
Does your masterpage have a reference to the control? Can you show us the import-code, or the using-directive?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hello Eddy,
Solved it A lot of thing didn't go well when I coppied MasterPage 1(MP1). Behind the scene there still were a lot of references to MP1. Because of this, strange event-firing went on and control's that I expected tot be there were'nt there. Silly me, ecussé mio Eddy
Greeting Stefan
modified 28-Aug-12 4:36am.
|
|
|
|
|
No problem, good to hear you solved it
|
|
|
|
|
In a C# 2010 web form application, I am trying to determine how and/or when I can obtain the identity key that was inserted into a table for a report that needs to be generated.
Basically in a linq to sql connection that connects to a sql server 2008 r2 database I have code that looks like the following:
db.Trans.InsertOnSubmit(trn);
db.Custs.InsertOnSubmit(cust);
db.SubmitChanges();
create_customer_report();
Basically in the line of code:
db.Trans.InsertOnSubmit(trn);
A new row is setup in the table called Trans. I do not believe the key to the table is actually updated in the database until the submitchanges() call is made.
In the line of code:
create_customer_report();
I need to add a line to the report in the create_customer_report method that includes the key to the table that was just inserted into the table from the code above.
I am concerned that I might not get the correct by doing a select max(key) from tran table since other users could be updating the table almost simultaneously in a different thread.
Thus my question is how can I obtain the key to the Trans table for the row that was just inserted into the table and have it appear on the customer_report?
|
|
|
|
|
sc steinhayse wrote: I do not believe the key to the table is actually updated in the database until the submitchanges() call is made.
Believing is a lousy way of programming. The record is not created until it is actually saved (when the transaction is committed) and that's the point where an identity is generated.
This[^] looked like the correct way, but I can't verify that it works.
sc steinhayse wrote: Thus my question is how can I obtain the key to the Trans table for the row that was just inserted into the table and have it appear on the customer_report?
Keys are never shown on a report. They do not contain any information. The correct way would be to use your "almost-key" as a unique field, and to use a real primary key that does not contain information to do the actual referencing.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|