|
|
Requires an active-Xcrement control - can't do it.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I want to share different files with different users, I want to give permission to specific user to share
a specific file and no two users can share the same file.
Controling:
1. Spasific computer
2. read only
etc..
|
|
|
|
|
The only way to do this, is to have users upload the files, and then your central app controls who gets what. So, you're talking about building a permissions system, which means users need to log in, and then have permission to files assigned to them.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Is it possible to detect the version of .Net that's installed on a client machine over the web? Specifically, I want to see if .Net 3.5 SP1 is installed.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Check this link.[^]
Hope it will help you.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hi Am trying to make a Socket web application for testing purposes.
I have sorted out how to use the socket appropriately and it seems like working fine.
One thing I did not figure out how to do is:
I use, for example, the following when creating a socket:
<br />
m_socListener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);<br />
<br />
IPEndPoint ipLocal = new IPEndPoint(IPAddress.Any, m_Port);<br />
m_socListener.Bind(ipLocal);<br />
m_socListener.Listen(4);<br />
m_socListener.BeginAccept(new AsyncCallback(OnClientConnect), null);<br />
I get the data after the Socket strip the ip/tcp headers.
I am interested in that headers, is there a way I can get it?
|
|
|
|
|
I just recieved a new PC at work with Visual Studio 2008 and Crystal Reports 2008 installed on it. I can't seem to add a reference in VS for the Crystal Reports and since they didn't install my old version of Crystal on it, none of my applications can buid without errors. How can I reference Crystal 2008 so that I can update my reprots and compile again? Help!
Thanks all for any imput at all...
|
|
|
|
|
I found the problem. Case closed!
|
|
|
|
|
Dear colleges,
I have run into the following situation:
webpage1.aspx is using UC1.ascx.
UC1.ascx has a button which as a result will redirect to webPage2.aspx
webPage2.aspx uses UC2.ascx. Within UC2.ascx I have a button (Send).
It seems like pressing the button leads to re-launching webPage2 (it's Page_Load method is being called with IsPostBack set to false).
The problem is that re-launching the page will result in a brand new UC2 instance, which will wipe out all information previously stored in it prior to selecting the Send button.
This is the code in webPage2.aspx.cs:
<br />
namespace conversion<br />
{<br />
public partial class SocketConnectionListPage : System.Web.UI.Page<br />
{<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!IsPostBack)<br />
{<br />
string[] parameters = new string[2];<br />
parameters[0] = Request.Params["protocol"];<br />
parameters[1] = Request.Params["port"];<br />
<br />
SocketConnectionList myAscx = (SocketConnectionList)FindControl("SocketConnectionList1");<br />
myAscx.SetSocketProperties(parameters);<br />
}<br />
}<br />
}<br />
}<br />
|
|
|
|
|
Not sure what the cause of the problem is but I've always tried to avoid doing navigation in user controls. What you could do it have your page subscribe to an event in the user control and when the button is pressed on the user control raise the event and the event handler in the page can do the redirection.
|
|
|
|
|
surround the button 'Send' with an update panel
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
What does that means?
Can you please explain what it does and where I do it?
|
|
|
|
|
I have seen the problem even more weird:
I have a webPage1.aspx which has a registered UC1.ascx.
When you click a button on this web page (all is actually UC1 which is loaded by webPage1.aspx), a new UC1.ascx instance is created. It will happen every click, and has nothing to do with browsing from one page to another.
Any clue?
|
|
|
|
|
I got confused,
Have you two different pages with two different usercontrols
Or it is just one page with user control that is added at runtime
Please, clarify
Or send a sample code
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Ignore what was previously written to avoid confusion.
I am doing a very simple thing: my aspx page is using a user control. Whenever I click a button, it seems like a new user control class instance is created, and hence all settings stored in the first user control instance were obsolete.
|
|
|
|
|
Following is my aspx file:
<br />
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebServer.aspx.cs" Inherits="conversion.WebServer" %><br />
<br />
<%@ Register src="SocketConnection.ascx" tagname="SocketConnection" tagprefix="uc1" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title>Socket Connection Test Page</title><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<br />
<uc1:SocketConnection ID="SocketConnection1" runat="server" /><br />
<br />
</div><br />
</form><br />
</body><br />
</html><br />
Following is my ascx file:
<br />
<br />
using System;<br />
using System.Collections;<br />
using System.Configuration;<br />
using System.Data;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.HtmlControls;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Xml.Linq;<br />
using System.Net;<br />
using System.Net.Sockets;<br />
using System.Collections.Generic;<br />
<br />
namespace conversion<br />
{<br />
public partial class SocketConnection : System.Web.UI.UserControl<br />
{<br />
DataTable myDataTable = null;<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!IsPostBack)<br />
{<br />
myDataTable = new DataTable();<br />
}<br />
}<br />
<br />
public void Apply_Click(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
Response.Redirect("SocketConnectionListPage.aspx?protocol=" + ProtocolDropDownList.Text +<br />
"&port=" + PortTextBox.Text +<br />
"&keepalive=" + KeepAliveRadioButtonList.SelectedValue +<br />
"&s_timeout=" + SendTimeoutTextBox.Text +<br />
"&r_timeout=" + ReceiveTimeoutTextBox.Text +<br />
"&s_b_size=" + SendBufferSizeTextBox.Text +<br />
"&r_b_size=" + ReceiveBufferSizeTextBox.Text +<br />
"&nagle=" + NagleRadioButtonList.SelectedValue +<br />
"&ttl=" + TtlTextBox.Text +<br />
"&dontfrag=" + DontFragmentButtonList.SelectedValue +<br />
"&broadcast=" + BroadcastButtonList.SelectedValue +<br />
"&multicast=" + MulticastRadioButtonList.SelectedValue);<br />
<br />
}<br />
catch (SocketException se)<br />
{<br />
System.Diagnostics.Debugger.Log(0, "1", se.Message);<br />
}<br />
}<br />
<br />
<br />
protected void ProtocolDropDownList_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
if (ProtocolDropDownList.Text.Equals("TCP"))<br />
{<br />
KeepAliveRadioButtonList.Enabled = true;<br />
NagleRadioButtonList.Enabled = true;<br />
MulticastRadioButtonList.Enabled = false;<br />
BroadcastButtonList.Enabled = false;<br />
DontFragmentButtonList.Enabled = false;<br />
TtlTextBox.Enabled = false;<br />
}<br />
else<br />
{<br />
KeepAliveRadioButtonList.Enabled = false;<br />
NagleRadioButtonList.Enabled = false;<br />
MulticastRadioButtonList.Enabled = true;<br />
BroadcastButtonList.Enabled = true;<br />
DontFragmentButtonList.Enabled = true;<br />
TtlTextBox.Enabled = true;<br />
}<br />
}<br />
<br />
protected void Reset_Click(object sender, EventArgs e)<br />
{<br />
KeepAliveRadioButtonList.Enabled = true;<br />
NagleRadioButtonList.Enabled = true;<br />
MulticastRadioButtonList.Enabled = false;<br />
BroadcastButtonList.Enabled = false;<br />
DontFragmentButtonList.Enabled = false;<br />
TtlTextBox.Enabled = false;<br />
<br />
KeepAliveRadioButtonList.SelectedValue = "false";<br />
NagleRadioButtonList.SelectedValue = "true";<br />
<br />
ProtocolDropDownList.SelectedValue = "TCP";<br />
PortTextBox.Text = "";<br />
ReceiveBufferSizeTextBox.Text = "";<br />
ReceiveTimeoutTextBox.Text = "";<br />
SendBufferSizeTextBox.Text = "";<br />
SendTimeoutTextBox.Text = "";<br />
}<br />
}<br />
}<br />
Now, in the ascx I put myDataTable variable for stub purposes. I use it to determine if a new SocketConnection user control is created.
It seems like the first time the page is loaded, I see a SocketConnection instance being created.
Then, if you click whatever button in that page, you see another instance of SocketConnection being created (as myDataTable is null).
I need to keep some information, like socket connection objects, in the user control class to be able to show a list of clients currently connected to this server and the messages exchange.
Thanks for your help.
|
|
|
|
|
I might not be fully understanding your problem but....
When the page posts back myDataTable will always be null, it doesn't mean a new instance is being created per se, page level variables aren't persisted between posts,you would need to store it somewhere (i.e. session) and repopulate on post back.
What is the value of PostBack in the user control when you click a button?
|
|
|
|
|
PostBack is false when a button is clicked.
How do I store information in session?
I mean I need to store socket connection objects etc? Any sample?
|
|
|
|
|
I got it.
No new instances are created. Actually the user control is reloaded from the server in each post back.
The solution is to cash the values you want to save between postbacks
There are several ways to do so
ViewState object
Session object
Application object
Cash object
Static Members
But take care, because you have to select the choice suitable to your situation
You will need to read about "State Management" in any ASP.NET refernce
Or try this
Web Aplication State[^]
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Hi
I have a field which has a carriage return in it. because of this it wont search this field properly and will not display any matching results.
How do you deal with carriage return fields so that I can query them?
thanks
|
|
|
|
|
Filter out those carriage return (\r).
You can either go with a regular expression or make your own string replace function.
e.g. string filteredstring = rawstring.Replace("\r", string.Empty);
Hope this helps.
Niladri Biswas
|
|
|
|
|
hi, i exported the datatable into word table. now what i want to do is that while exporting the datatable i want to restrict user to edit the first column only in word document . is it possible to do it with vb.net code. if yes please help me , thanks in advance.
|
|
|
|
|
trimandir prajapati wrote: is it possible to do it with vb.net code. if yes please help
And what does it has to do with ASP.Net?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi
I am using inline sql to search a table column. Some of the fields in the column have ' ' in them and whenever these fields are chosen it shows an error 'In correct Syntax near the text that is in the ' '.
Is this a problem because it affects the sql syntax in the statement?
My code goes something like 'select from table where field is LIKE '%" + name + "%'"
Any help would be great.
thanks
Jamie
|
|
|
|