|
m using sql server 2000....n m all new 2 crystal reports n i hve been assigned this project...i rely dunno wat 2 do..
Tanya...(urs_forever_tanya@yahoo.co.in)
|
|
|
|
|
Have a google for some crystal report tutorials would probably be a good first move. It's hard to help you here if you can't help yourself a little bit...
|
|
|
|
|
Hello all,
I have developed a web application in ASP.Net using C# with login credentials.
I am getting following problem with it.....
I am logging in as user "abc" from one computer in network, its working fine. At the same time, i m logging in as different user say "xyz" on other computer. After this, when i refreshes my "abc" user's page it shows all contents of "xyz" user and hence automatically expires session of "abc".
I am not getting where the actual problem is, please anyone of u can help me with this?
Pravin
|
|
|
|
|
pavya_Cool wrote: when i refreshes my "abc" user's page it shows all contents of "xyz" user and hence automatically expires session of "abc".
Are you using Application variable to store the user details? And what is the authentication mode here?
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi I am using session variable here...and authentication mode is forms.
Pravin
|
|
|
|
|
Can you post an example of the code you are using to store the details of the current user?
|
|
|
|
|
private void BtnGo_Click(object sender, System.EventArgs e)
{
Label1.Visible=false;
bool persistcookie=true;
if(ValidateUser(TextBox1.Text,TextBox2.Text))
{
//string globalstrConn="Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=iMedia;Integrated Security=SSPI;";
Session["UserName"]=TextBox1.Text;
//This will store the username of the user in this session variable
// We can retrieve this username on different pages by using following code.
// string str=Convert.ToString(Session["UserName"]);
FormsAuthenticationTicket tkt;
string cookiestr;
HttpCookie ck;
tkt=new FormsAuthenticationTicket(1,TextBox1.Text,System.DateTime.Now,System.DateTime.Now.AddMinutes(Convert.ToInt32(ConfigurationSettings.AppSettings["timeout"])),persistcookie,"Your Custom Date");
cookiestr=FormsAuthentication.Encrypt(tkt);
ck=new HttpCookie(FormsAuthentication.FormsCookieName,cookiestr);
if(persistcookie)
ck.Expires =tkt.Expiration;
ck.Path =FormsAuthentication.FormsCookiePath;
Response.Cookies.Add(ck);
string strredirect;
strredirect=Request["ReturnUrl"];
if(strredirect==null)
strredirect="login.aspx";
Response.Redirect(ConfigurationSettings.AppSettings["defaultpage"],true);
}
else
{
Label1.Text="Invalid Credentials!";
Label1.Visible=true;
// Response.Redirect("login.aspx",true);
}
}
Please someone help me.
Pravin
|
|
|
|
|
|
i am not getting responce there.... thats why i posted here ... do u have any problem????
Pravin
|
|
|
|
|
pavya_Cool wrote: am not getting responce there.... thats why i posted here ... do u have any problem????
Yes. These posts aren't under your name. Have you created multiple identities? More importantly, if these are all you, you shouldn't repost in an attempt to get the post to the top. This is a volunteer only forum, and people will get around to your post when they can.
|
|
|
|
|
Pete O`Hanlon wrote: Have you created multiple identities?
In the study of Psychology, there is a concept called 'Multiple Identity Disorder'. A quick Google search shows this:
http://skepdic.com/mpd.html[^]
Perhaps, is he suffering from that?
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 m using nested grid and in child grid i m using EmptyDataTemplate in which i hv one htmlanchor tag which is redirecting to another page when that child grid is empty and i m passing parentgridrow id as query string parameter to that anchor tag.
here i m giving u code what i m using.
Protected Sub ParentGrid_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles ParentGrid.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim s As SqlDataSource = CType(e.Row.FindControl("SqlDataSource1"), SqlDataSource)
s.SelectParameters(0).DefaultValue = e.Row.Cells(0).Text
CType(e.Row.FindControl("ChildGrid"), GridView).DataBind()
End If
End Sub
Protected Sub grdProduct_DataBound(ByVal sender As Object, ByVal e As System.EventArgs)
Dim grd As GridView = CType(sender, GridView)
Dim grdr As New GridViewRow(-1, -1, DataControlRowType.EmptyDataRow , DataControlRowState.Normal)
Dim cell As New TableCell
cell.ColumnSpan = 2
cell.Width = Unit.Percentage(100)
Response.Write(CType(sender, GridView).Rows.Count)
End Sub
it is giving output like shown below:
0
7
0
2
0
15
where 7 indicates 7 row of 1st child grid (child grid in 1st row of parent grid)
same way 2 and 15 also
means in my parent grid there r only 3 row (means there r only 3 child grid would created)
then why i m geting other three zeros. can any one explain me the execution flow for nested grid.
Thanx in advance,
|
|
|
|
|
MaruBindiya wrote: Protected Sub grdProduct_DataBound(ByVal sender As Object, ByVal e As System.EventArgs)
This Event is firing twice. That is before DataBinding (Empty Grid), and after DataBinding (With Data).
|
|
|
|
|
in my application document.referrer is shown empty string ???
|
|
|
|
|
From MSDN Library:
"This property returns a value only when the user reaches the current page through a link from the previous page. Otherwise, document.referrer returns an empty string; it also returns an empty string when the link is from a secure site."
Also, some antivirus/firewall applications remove the referrer information from requests, so you can't rely on it always be there.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Exactly...Thanks For Reply
|
|
|
|
|
hi,
i have a checkbocxcolumn in the datagrid..
i need to select only one checkbox..and if he selects more than one checkbox...it has to show a message that .."select only one checkbox"
how can i do this in asp.net
|
|
|
|
|
1) declare one variable in Javascript
2) set it as 0 by default.
3) write the javascript code
- if chk is checked then
if thisvariable less than 1 then set this variable to 1
else thisvariable is 1 then show the alert("select only one checkbox")
else // chk is unchecked
set thisvariable to 1
4) Add this code in onclick (client-side) event of checkedbox
|
|
|
|
|
beklo.com/rameshgoudd wrote: i have a checkbocxcolumn in the datagrid..
i need to select only one checkbox..and if he selects more than one checkbox...it has to show a message that .."select only one checkbox"
Why don't you have a radio button in that column?
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi,
in the gridview even if you put radio button then it will not solve problem.
Bcoz in grdview it will vreate dynamically radiobutton.
And you cant get result as you can get in simple radiobutton.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Sun Rays wrote: in the gridview even if you put radio button then it will not solve problem.
Bcoz in grdview it will vreate dynamically radiobutton.
And you cant get result as you can get in simple radiobutton.
But with small programming trick, you can do it.
|
|
|
|
|
Sun Rays wrote: in the gridview
DataGrid
Sun Rays wrote: if you put radio button then it will not solve problem
Did I tell that it will solve the problem? Have you ever seen in any web page having a list of check boxes in the same group, when user selects more than one prompting a message saying "don't select more than one". Don't that sort of design defeats the purpose of using Check boxes?
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi Guys,
As I were said,
in datagrid / gridview if putting radio button then that will be in templatefield.
and if you know then its creating radiobutton at runtime for every row.
So cant assign group in that radio button.
So will you be with your radio button everytime ?
What now ? any doubt ?
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
I can understand that Using radio-button in a DataGrid will have the same effect as CheckBox. Will that be a problem if we write a JavaScript function to control the single selection of the radio-button list. There's another alternative too to sort this problem, by Adding a label and dynamically adding HTML input tag as Label Text with type as radio and runat server enabled and with the same group name. This works.
Sun Rays wrote: So cant assign group in that radio button.
Try dynamically adding HTML Server Input Control with type radio and with the same group name.
Sun Rays wrote: So will you be with your radio button everytime ?
Yes, when required.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi,
John Prabhu wrote: Try dynamically adding HTML Server Input Control with type radio and with the same group name.
Have you tried for this ?
Hope is works fine....
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|