|
If I am developing an application that must accomodate multiple security levels though secure
login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing).
What would be the best approach to maintain login-in state for the users?
please answer this question this question asks to me in interview.
|
|
|
|
|
Jas 007 wrote: ogin and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing).
What would be the best approach to maintain login-in state for the users?
I have written a complete article on Maintaining session in Web Farm , Load balancer scenario. Please Have a look
Exploring Session in ASP.Net[^]
|
|
|
|
|
Hello
I want to download one folder containing files from remote server to local computer. i am using vb.net. how should i do it? i have two possible ideas
1. Make zip file, down load to local machine and unzip
2. download files one by one using binary stream.
which one is perfect. if there is any other way?
Please Help
thanks
|
|
|
|
|
2nd idea will work perfectly, Since for implementing 1st one you need to create zip file on server. That itself is quite tedious. If you are having long haul of time then think about 1st one, other wise implement 2nd approach with the help of starter tutorial from : Downloading Files with the WebRequest and WebResponse Classes[^]
Thanks
Ashu
dnpro
"Very bad programmer"
|
|
|
|
|
i have to impliment this on windows (.net)
and there is one more problem, files may be already existing there, with same names as those that are being downloaded.
|
|
|
|
|
Hi Team,
Functional requirement is to upload a file from remote machine(Client Machine) Without using fileupload control.
In this scenario i have done the functional requirement ,like the file can be uploaded from client machine but it must needed to network share to the folder to get the file from client machine.
My requirement is that, Could it be possible to get the file from client machine / and upload on remote server.
Could Anybody help me out from the above scenario.
Tarun Singh
Zenta
|
|
|
|
|
We faced the similar scenario.
The problem was solved as:
1. We created a server application that open a Socket on a particular port of Sever.
2. When client machine need to send data to sever, it converts file to stream, connect to remote socket and transfer data. Finally closes socket connection.
3. Server side control, when receive data from client, it converts stream back to file and save it on disk.
Our transfer was of single file type, so we do not require and special tokens to be passed to identify file type.
|
|
|
|
|
Thanks Amandeep,
I will implement this functionality baisis on the given logic.
|
|
|
|
|
Your Requirement :
Functional requirement is to upload a file from remote machine(Client Machine) Without using fileupload control.
It is quite clear that you want to get the file from remote machine (Client Machine). But where do you want to upload the file.
Please correct me I am wrong
Thanks
Ashu
dnpro
"Very bad programmer"
|
|
|
|
|
Not sure this is the right forum to ask. If not, please advice me the right forum.
In my form, I'm using an UpdatePanel which contains three dropdownlists. The second one depends on the first one's selection and third one depends on first one's selection. All are working fine and data is populating perfectly fine.
My issue is when I checked in the browser, all the three dropdownlists are displaying together in a congested manner and the corresponding labels are displaying at the bottom of each dropdown.
Can anyone please help me in right design of putting dropdown controls in an Update Panel.
I've attached the HTML design code for reference:
<td>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="CompanyList" runat="server"
Height="22px" Width="155px" AutoPostBack="True" AppendDataBoundItems="true"
onselectedindexchanged="CompanyList_SelectedIndexChanged" >
<asp:ListItem Selected ="True" Text="--Please Select--"></asp:ListItem>
</asp:DropDownList>
<br />
<asp:UpdateProgress ID="UpdateProgress2" AssociatedUpdatePanelID="UpdatePanel2" runat="server" >
<ProgressTemplate>
<span class="ProgressBar">
Data Loading. Please Wait....</span></ProgressTemplate>
</asp:UpdateProgress>
<asp:DropDownList ID="ProjectList" runat="server" AppendDataBoundItems="true"
Height="23px" Width="155px" AutoPostBack="True"
onselectedindexchanged="ProjectList_SelectedIndexChanged" >
<asp:ListItem Selected ="True" Text="--Please Select--"></asp:ListItem>
</asp:DropDownList>
<br />
<asp:DropDownList ID="UserTypeList" runat="server" AppendDataBoundItems="true"
Width="155px">
<asp:ListItem Selected="True" Text="--Please Select--"></asp:ListItem>
</asp:DropDownList>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</td>
I'm not sure how to display this controls correctly?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
its simple. you forgot to add < table > . on design time click inside the update panel and insert table of 1 row and 3 columns and place your combobox in each columns. done. dont place comboboxes in single < td >.
i.e.
< td>
< update panel tag >
< table>
< tr>
< td>
now youe first dropdownlist
< /td>
< td>
second one
< /td>
< td>
third one
< /td>
< /tr>
< /table>
< / update panel tag >
< /td>
|
|
|
|
|
How can i clear the context.user value when i log out? Since when I click the ie back button it is still filled? Is there any other way to create a logout? Thanks
|
|
|
|
|
If you are using Forms authentication, did you try FormsAuthentication.SignOut() method?
Bhaskara
|
|
|
|
|
Hi.
I have a userControl with this method : (tbl1 is an ASP.Net Table Control)
Public Sub MyInit()
Dim txt As New TextBox()
Dim tc As New TableCell()
tc.Controls.Add(txt)
Dim tr As New TableRow()
tr.Controls.Add(tc)
tbl1.Controls.Add(tr)
End Sub
and there is a button on this userControl that I've written this Code in Click event:
Dim i As Integer = tbl1.Rows.Count
Now, In a web form that has a button, I dropped this usercontrol, and in Click event I've written :
userControl1.MyInit()
And Now by clicking the button of web page, a row with a TextBox inside, will add to page,
but after clicking the button in usercontrol, tbl1.Rows.Count is 0.
I want to read the Text of TextBox, but at all the tbl1 is clear!
I've to creat controls dynamically as above (MyInit()), how can I solve it?
Best wishes
|
|
|
|
|
hi everyone
I created an application in that i can send mails to gmail but
iam unable get code for how to recieve mails which i will send from gmail or yahoo..
to my application..
Is it possible to receive mails to application which is running on my local machine
Please help me
thanks in advance...
|
|
|
|
|
I am not sure about Yahoo, But google provides some API to aceess mails. You can explore them .
|
|
|
|
|
|
Hi,
I am having datagrid in which data is coming.Suppose we have three rows in the datagrid.Each row is having a checkbox.In each row we have five columns. One of them is "QTY" which is having a textbox as a templte column.Below the grid we have a "update" button.Suppose in the original state quantity is "1".And the user changes it to "4" and presses the update button.Then the row should be modified having quantity "4".
What I have done is:
protected void BtnUpdate_Click(object sender, EventArgs e)
{
dt = (DataTable)Session["Cart"];
CheckBox chkSelected = new CheckBox();
foreach (DataGridItem dgItem in DataGrid2.Items)
{
chkSelected = (CheckBox)dgItem.FindControl("chkSelection");
if (chkSelected.Checked == true)
{
TextBox TxtQTY = (TextBox)dgItem.Cells[2].FindControl("TxtQTY");
int Txt2 = Convert.ToInt32(TxtQTY.Text);
Label lblProduct_Id = (Label)dgItem.Cells[0].FindControl("lblProduct_Id");
string id2 = lblProduct_Id.Text;
Label lblDescription = (Label)dgItem.Cells[1].FindControl("lblDescription");
string desc2 = lblDescription.Text;
Label lblPrice = (Label)dgItem.Cells[3].FindControl("lblPrice");
float price2 = Convert.ToSingle(lblPrice.Text);
Label lblCost = (Label)dgItem.Cells[3].FindControl("lblCost");
float cost2 = Convert.ToSingle(lblCost.Text);
float final_cost = price2 * Txt2;
DataRow myrow = dt.NewRow();
myrow["REF"] = id2;
myrow["Description"] = desc2;
myrow["QTY"] = Txt2;
myrow["Price"] = price2;
myrow["Cost"] = final_cost;
dt.Rows.Add(myrow);
dt.AcceptChanges();
Session["data"] = dt;
}
}
DataGrid2.DataSource = dt;
DataGrid2.DataBind();
}
But when I am pressing the update button it is updating the row but it is also showing the previous row.
I am trying to get the index of the row which is checked by the user to update.And then I will delete that row.
But I am unable to do this.
Help me out ...
Thanx in advance.
cheers,
sneha
|
|
|
|
|
Dear,
First, this is the wrong board, DataGrid is desktop control, why you asking about it in ASP.NET board.
Second, I see that you send the same question about 10 times, and somebody sent you answers on the C# board
Third, I think you have to make use of MSDN, or read some books first
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Mohammed Gouda wrote: DataGrid is desktop control
Click[^]
|
|
|
|
|
Hi Sneha ,
Instead of writing the following code:
foreach (DataGridItem dgItem in DataGrid2.Items)
{
chkSelected = (CheckBox)dgItem.FindControl("chkSelection");
if (chkSelected.Checked == true)
{
Write the code written below:
foreach (GridViewRow gr in DataGrid2.Rows)
{
if (((CheckBox)gr.FindControl("chkSelection")).Checked == true)
{
-----Have A Nice Day-----
|
|
|
|
|
Hi,
When it is said to wrap a control with something else. what does it mean?
Best wishes
|
|
|
|
|
Wrapper means a control is used as a component of another control, so that it can behave the same way but have extra functions within it.
Abhishek Sur
|
|
|
|
|
if (file.Exists)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(file.FullName);
Response.End();
}
I am using the above code to download files listed in a listbox control
I am placing the listbox in WebPartZone to enable the client to change the page layout, also I put it in an AJAX UpdatePanel to disable postbacks
When I use ONLY the UpdatePanel, it works well
When I use ONLY the WebPartZone, it works well
When I use both together, I get an exception saying:
Sys.WebForms.PageRequestManagerParseErrorException: The message received from the server could not be parsed.Common causes for this error are when the response modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'MZ'.
foreach(Minute m in MyLife)
myExperience++;
modified on Thursday, January 22, 2009 2:49 AM
|
|
|
|
|