|
Hi
Your Explanation is exactly right but our requirment is different.
actually my process is directly logging through the code only
in our office 40 member are there and site has 2 users accounts.
is it not possible to login 40 members into 2 user accounts.
that's why we are going to implement access the 40 members through 2 users
i want login users in server side, members pass the request and get the results but server side never logout if one memeber get the result over.
i think u can understand my process ,
then plz tell me how to handle 2 users acounts at server side.
thx
ravi
|
|
|
|
|
I'm still having trouble understanding you. I'm curious why you only have 2 user accounts. Is this your server, or are you trying to figure out how to let 40 users use 2 accounts on some other site? If that's the case, it really depends on how the other side is set up. It might have nothing to do with Session.
Perhaps if you clarify this sentence: "i want login users in server side, members pass the request and get the results but server side never logout if one memeber get the result over."
I'm not sure if you mean "the server side never logs out but I want it to" or "the server side logs out but I don't want it to".
|
|
|
|
|
Hi
thx for ur reply
exactly my meaning is " The server side never logs out."
i will give u another example
i have one web page which have 2 buttons.
when i click button open one user account and click second button open another user account.
how can i identify both users logged or not.
can u give me any idea about this
|
|
|
|
|
The cache is shared between all users...
Button 1: Cache("User1") = True
Button 2: Cache("User2") = True
on the server side you can determine if either or both have been clicked. However, you still have the problem that Cache times out, and how do you know if a browser is closed? You don't. The server has no way to know if a user has simply closed the browser.
I'm only tossing out suggestions. I'm sorry, but I still don't understand what you really want.
|
|
|
|
|
Hi
How to combine two Applications(solutions) into one application
"is there any possibility to work with two different kind of applications in a single application".
this is very urgent
if any one know plz reply me.
if know any examles forword to me
advance thanks
|
|
|
|
|
>How to combine two Applications(solutions) into one application
You can include the project(s) of one solution in another solution. Right click on the solution, Add Existing Project... and browse to a project from another solution (I have VS 2003 in front of me, can't remember if 2005 is slightly different)
>"is there any possibility to work with two different kind of applications in a single application".
You can have various project types in the same solution. I have one in front of me with a website, a windows form, and various business and data layer projects.
For a more complete answer, trying asking a more complete question.
It seems like most questions on here are 'very urgent'. Too urgent to even use complete sentences.
|
|
|
|
|
Hi,
I am trying to set the length of a field to a pre-defined certain value. For this reason I am padding right incase it is not the required lenght. for example
String1 = "Trailer1"
String2 = "Tra"
String1.ToString.PadRight(6) = "Traile" - should get me this value
String2.ToString.PadRight(6) = "Tra " - should get me this value.
Is it correct to use padright to limit the length of string?
Thanks so much for your time.
|
|
|
|
|
PadRight will not limit the length it will only pad it.
You example is not correct, but if you did:
String1.ToString.PadRight(6) = "Traile1" you would still get all seven characters. If you want to get only six characters you will need to substring after the padright
String1.ToString.PadRight(6).Substring(0,6)
Hope that helps.
Ben
|
|
|
|
|
Dear All,
I am mess with one situation let me explain the scenario.
I am making search form where I display 15 field in checkboxlist and user select one or two or three or any no to all field. Depending on his selection (he tick the field and click filter button ) Now in filter button click I create label and dropdownlist control(populated from database) and add it to placeholder control. Now I select value and click the search button. Now in search button I need to access those control and its selected value(ie label and droplistbox ).
I have made function to create label and dropdownlistbox which is
private void createcontrols()
{
foreach (ListItem li in CheckBoxListmst.Items)
{
if (li.Selected == true)
{
//code added to fetch dropdownlist
setting = ConfigurationManager.ConnectionStrings["StyleSearchConnectionString"];
if (setting != null)
{
Code to access data for populating dropdownlistbox
try
{
// added controls
Label label = new Label();
DropDownList dropdownlist = new DropDownList();
label.ID = "label" + i.ToString();
dropdownlist.ID = "dropdownlist" + .ToString();
i++;
rdr = cmd.ExecuteReader();
while (rdr.Read())
{
Items for dropdownlist
}
PlaceHolder1.Controls.Add(label);
PlaceHolder1.Controls.Add(dropdownlist);
}
catch (SqlException ex)
{
}
Now this create function I call in one in filter button click event and second as
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
createcontrols();
}
Now in seach button click event when I am trying to access
Code is
Label objlbl;
DropDownList objdrop;
objlbl = this.Page.FindControl("label1") as Label;
objdrop = this.Page.FindControl("dropdownlist1") as DropDownList;if ((objlbl != null) && (objdrop != null))
{
cmd.Parameters.Add("@para1", SqlDbType.VarChar).Value = objlbl.Text; //Page.FindControl("label1").ToString() ;
cmd.Parameters.Add("@value1", SqlDbType.VarChar).Value = objdrop.SelectedValue;
}
I am getting objlbl and objdrop as null.
Please help
thanks
imaran khan
|
|
|
|
|
You will have to search the PlaceHolder control and not the page. You will have to do a PlaceHolder1.FindControl(controlid)
Label objLabel = PlaceHolder1.FindControl("Label1") as Label;
DropDownList objDropDown = PlaceHolder1.FindControl("dropdownlist1") as DropDownList;
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
did the same but still object are null even i check it for control id they are same.
please help
imaran khan
|
|
|
|
|
FindControl() should return the control. Did you debug and check if the PlaceHolder contains the controls? Debug and check the id of the control's that are in the PlaceHolder .
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
You may need to call createcontrols() from Init rather than OnLoad. The problem is that on postback, the values in your checkboxes are saved in viewstate, which gets applied between Init and Load. If you wait until Load to create your controls, the viewstate won't be applied to them, and they'll lose their values.
|
|
|
|
|
i change the code and put it in Oninit as
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
createcontrols();
}
but still oject are null....
please help
imaran khan
|
|
|
|
|
My fix isn't for the problem you have (objects are null) but for the next problem you'll encounter (objects won't maintain values on if you dynamically create them too late in the page cycle).
The other solution posted to search the placeholder rather than the page for the controls should work, so I'm not sure what's wrong. I would use the debugger to inspect the contents of the placeholder's controls to see if anything is there.
|
|
|
|
|
I have aspx pages sitting in two different folders and both are mapped in virtual directory. I want to use response.redirect. How would I go about doing that?
|
|
|
|
|
Response.Redirect(Server.MapPath("FolderName\\FileName.aspx"));
I Love SQL
|
|
|
|
|
Edit: Bah. problem has been fixed.
--
Hi, I have a slight problem with getting records from a database.
The problem is simply when I use the following SQL string, it throws me up an error message.
Problem string:
"SELECT * FROM IDs WHERE id='2'"
However when I use this SQL string, it works.
Working SQL string:
"SELECT * FROM IDs WHERE name='bob'"
I have no idea why one is working and the other isn't. The only thing I could think of is a type mismatch (The id field is set to AutoNumber). I get the same error when trying to use both Strings and Integers.
Anyone have any ideas?
- Munty
-- modified at 10:20 Thursday 26th July, 2007
|
|
|
|
|
Muntyness wrote: it throws me up an error message
What error message it return?
I Love SQL
|
|
|
|
|
Ahhh goddammint!
I figured out what the problem was.
I was using "SELECT * FROM IDs WHERE id='2'" when I should have been using "SELECT * FROM IDs WHERE id=2".
|
|
|
|
|
Have you tried:
"SELECT * FROM IDs WHERE id=2"
|
|
|
|
|
Hello All,
Need your help with regards to SSO(Single Sign On). Lets say I have two websites A and B. After user logs on to A(login.aspx) user needs to go a say a default.aspx page and on Default.aspx, there is a button which on click should send the user to website B,(both websites are on the same domain..lets say a.abc.com and b.abc.com) as user is already logged on site A..it should directly send the user to welcome.aspx page on site B. Iam using form authentication. This is what i have in my web.config on both sites.
<authentication mode="Forms">
<forms name=".SSOAUTH" loginUrl="Login.aspx" protection="All" path="/" timeout="30"/>
</authentication>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
<machineKey validationKey="1234567890" decryptionKey="9876543243" validation="SHA1"/>
On my site A login page, when user enters a login and password, i call a function and go against my DB and validate, if login and pwd match db, i return customerid and the code is as below:
Dim customerid As String = ValidateUser(txtUserName.Value, txtUserPass.Value)
If customerid <> "0" Then '--------Comment-if login is fine, customerid is never 0
Dim tkt As FormsAuthenticationTicket
Dim cookiestr As String
Dim ck As HttpCookie
tkt = New FormsAuthenticationTicket(1, txtUserName.Value, DateTime.Now, DateTime.Now.AddMinutes(30), True, "your custom data")
cookiestr = FormsAuthentication.Encrypt(tkt)
Session("FormData") = cookiestr '------Comment-saving in session for later use
Dim b As String = FormsAuthentication.FormsCookieName
Response.Cookies(b).Domain = .abc.com
Response.Cookies(b)("SiteA") = cookiestr
Response.Cookies(b).Expires = tkt.Expiration
Response.Cookies(b).Path = FormsAuthentication.FormsCookiePath
Response.Redirect("default.aspx")
Dim strRedirect As String
strRedirect = Request("ReturnURL")
If strRedirect <> "" Then
Response.Redirect(strRedirect, True)
Else
strRedirect = "Default.aspx"
Response.Redirect(strRedirect, True)
End If
Else
Response.Redirect("Login.aspx", True)
End If
My problem is it never redirects to Default.aspx on Site A... and from default.aspx on Site A..if i click a button..i need to it go to welcome.aspx on site B... for some weird reason though, it goes back to the login page..and further.. the cookie is set..its not reading it on site B. Please Help !! Any help is appreciated, where am i going wrong? code samples are much appreciated.
RH
|
|
|
|
|
I'm looking the code or codes of parameters in Crystal Report that I can access using C #. I appreciate your help.
|
|
|
|
|
|
with 'OWC .NET testpages demo app' depending on the option I select in:
'OWC demoss:
Scatter chart demo
OWC chart types
OWC chart with trendline and errorbars
I get 'could not load type: main.aspx
owctypes.aspx
trend.aspx
any ideas?
john
|
|
|
|