|
hello,
I want to call an ASP page and retrieve the response.
This can be done with HttpWebRequest,
but this request seems to be launched as a different session ?
I want to avoid posting a form or working with the querystring,
so everything is stored in the session.
anyone has an idea what I should do?
gr,
Niko
<< Nearly all men can stand adversity, but if you want to test a man's character, give him power. >>
|
|
|
|
|
I think you need to pickup the cookie and other Request Headers and emit the same along with your WebRequest.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Vasudevan Deepak K wrote: I think you need to pickup the cookie and other Request Headers and emit the same along with your WebRequest.
Can ASP.NET cookies/Request Headers sharable with ASP or other ASP.NET application? If so, where is the security then?
|
|
|
|
|
|
hello,
Thanks for your answer.
found some other
http://forums.asp.net/p/945319/1145830.aspx[^]
only cookie ASP.NET_SessionId needs to be replaced.
for the moment, can't get this to work correctly...
<< Nearly all men can stand adversity, but if you want to test a man's character, give him power. >>
|
|
|
|
|
hi friends
how to ping the IP address using .net
regards
saravanan
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
use System.Diagonistic
<br />
Process pro = new Process();<br />
pro.StartInfo.UseShellExecute = false;<br />
pro.StartInfo.RedirectStandardOutput = true;<br />
pro.StartInfo.RedirectStandardError = true;<br />
pro.StartInfo.FileName = "Ping";
pro.StartInfo.Arguments = "ip Address" <br />
pro.Start();<br />
pro.WaitForExit();<br />
Hope it will help
|
|
|
|
|
That would launch the external ping utility. You ought to capture the output of the command. Instead of that, you can simply try the following:
www.csharphelp.com/archives/archive6.html [^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
|
I have difficulty to create a two-column website by ASP.NET, I mean the vertical menu on one column, the main content on the other. But they are on top of each other, even with Div. I don't know how to make them next to each other horizontally. I am new to ASP.NET, could anyone tell me how to create the two-column frame, please?
Much Appreciate if you help
|
|
|
|
|
|
If you want to create the DIV-based layout instead of using table-based layout, you should have good understanding about CSS float.
You can learn about CSS float from this link (Step By step CSS float tutorial[^] ) This is the best tutorial about CSS float that I even read.
|
|
|
|
|
I am adding rows at runtime in a gridview with a remove button in every row.
On clicking the remove button, the row having that remove button will be deleted.
Problem steps:-
1. I added 2 rows and then click a remove button of second row the second row will be deleted.
2. press f5 to refresh the page and it will give ERROR !!!
I think on clicking refresh it will fire the last event again but in this case, button that caused last event have been deleted
so button id will not found and error will be generated.
Can somebody tell me the solution !!!
Gaurav
|
|
|
|
|
G.K.M. wrote: ERROR
What ERROR?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi,
I have the directory named NDP on my local machine (named PC4) which is in a domain. On my domain server, I have IIS 6.0 (windows 2003) and database server.
I have the following sample code
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
Label1.Text = "";<br />
DataTable dt = new DataTable();<br />
<br />
<br />
StreamReader sr = new StreamReader(@"\\Pc4\C$\NDP\Test1.csv");<br />
<br />
string line;<br />
while((line = sr.ReadLine()) != null)<br />
{<br />
Label1.Text += line;<br />
<br />
<br />
}
I have impersonate="true" in web.config file. The authentication mode is WIndows Integrated authentication. I have given permissions to ASPNET accounts and Windows accounts for the NDP folder.
Can I read this .csv file? Because it is giving me error.
I have also this code.
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
String username = System.Security.Principal.WindowsIdentity.GetCurrent().Name;<br />
Label1.Text = username;<br />
<br />
<br />
}<br />
When executed it gives me the name of the user through which I have logged in but does not give access to my shared folder.
Totally stumped. Any Solutions???
|
|
|
|
|
It's not good idea to read the file from other machine in ASP.NET. What you should do is that you should create the web service that can copy the file from a particular machine (e.g. PC4 in your case) and upload those files to the service at specific time. then, read those files from your ASP.NET.
|
|
|
|
|
Dear Programmers,
I am developing a project in which there are two user levels. One is customer and another is administrator. I want to show customer one web1.sitemap and administrator anothere web2.sitemap. I have attached the menu on Master Page.
Please help me to solve this problem. reply me ASAP.
Thankyou.
|
|
|
|
|
You will want to configure two sitemap providers in your web.config file.
Reference the MSDN article[^] on the topic - that should help you.
Zeeshan Memon wrote: reply me ASAP.
Pretty demanding, aren't you?
|
|
|
|
|
hi
can some one guide me how to build a tag cloud specially its data fetching. i am using asp.net 1.1 with c# and sql server 2k.
details
i have problem in counting the tags.
i am storing the tags in a single column as varchar entry seprated by space, dont catch up with the idea how to get the distinct tags from single column and then got their weight as well
thanks in advance
shezi
|
|
|
|
|
|
i had seen it before. but that is a very simple case just count the products against a category, while i am storing tags in a single column seprated by space first need to get the indivisual tag and then its weight but got problem in making query.
need guidance regarding how to fetch tags and their weight from single column of a table
shezi
modified on Monday, January 21, 2008 2:36:47 AM
|
|
|
|
|
shah zad wrote: while i am storing tags in a single column seprated by space first need to get the indivisual tag and then its weight but got problem in making query
Well, if you normalise your data model you won't have that problem. You should only ever store a single piece of data in a column value. You should not be storing multiple tags in a single row.
You need to create a new table and split the tags out into the new table. Then set up a many-to-many join between your original table and your tags table. A many-to-many join requires the setting up of an intermediate table.
shah zad wrote: need guidance regarding how to fetch tags and their weight from single column of a table
While it is possible, it is increadibly inefficient and goes against decades of guidance on how to define relational databases.
|
|
|
|
|
Is it possible to enter data into a grid directly when a project is run.
|
|
|
|
|
SreejithAchutan wrote: Is it possible to enter data into a grid directly when a project is run.
Yes. But GridView does not support it directly. You have to manually make it editable. Use TemplateColumns and add controls and try.
|
|
|
|
|
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:ButtonField DataTextField="DeptName" CommandName="Select" HeaderText="DepartmentName" ></asp:ButtonField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="txt1" runat="server"> </asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
protected void Button1_Click(object sender, EventArgs e)
{
int DeptID;
string ID;
foreach (GridViewRow gr in GridView1.Rows)
{
ID = Gdv_Dept_List.SelectedDataKey.Value.ToString();
DeptID = int.Parse(ID);
TextBox tx = (TextBox)gr.FindControl("txt1");
insDept.up(DeptID,tx.Text);
BindGrid();
}
}
I gave the above design code and also in button click event above code is given.but when we tried to save it the selected field is updated to empty.what is the reason.
|
|
|
|