|
check this out
http://www.netomatix.com/GridInGrid.aspx
|
|
|
|
|
u got any asp.net meterial plz send me srinath.02@gmail.com
and a topic on grid views i am
|
|
|
|
|
Try searching on the internet for an article that is suitable
|
|
|
|
|
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 suppose "abc" from one computer in a 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 as well as username listing of "xyz" user and i am not being able to see "abc" user's content then. Both pages are showing contents of "xyz" user.
If i login with another user say "pqr" on different page without logging out first two users, then all three pages displays the contents of "pqr" user.
I am not getting where the actual problem is, please anyone of u can help me with this?
Here is my code......
private void BtnSubmit_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.
Thanks,
Nagendra.
|
|
|
|
|
Are you opening a new browser window when you log in as another user or are you logging in using a new tab in the same window.
|
|
|
|
|
I am facing same problem in both ways either opening a new browser window or using a new tab.
|
|
|
|
|
How do I indicate that an image button is disabled? Do I have to provide an alternate image, or is there some more sensible way?
It is quite important that the user knows when the button is enabled and when not, as it's sort of a guidance.
|
|
|
|
|
imagebutton.enabled = false
|
|
|
|
|
That only disabled the button, it doesn't change the image. Oops, you've just reminded me that I now have a nicely greyed out but still enabled button.
|
|
|
|
|
You could have two images buttons and then use them like following:
if (imagebutton.enabled == false)
{
Imagebutton1.visible = true
}
else
{
Imagebutton2.visible = true
}
|
|
|
|
|
That's unnecessarily complicated, as simple as it is. For now I just use two images, one green and one grey. I was curious as to there being a more elegant solution, but the only candidate there is a control derived from ImageButton that has two ImageUrl properties, and renders the appropriate one depending on its Enabled property.
|
|
|
|
|
Hi All,
I'm using two dropdownlists in page1 and depending upon dropdown1 selection I'm filling the dropdown2 using Ajax. After that I will add some more data to dropdown2 using page2.If I come to page 1 and select dropdown1 selection it is filling only the old data not the updated one.
It is filling data only once,2nd time if I select same option it is not going to the codebehind of my breakpoint..May i know the reason for this?
May i know where I have done wrong? How to resolve this now?
Thanks in Advance,
Raja Raman S
Meeram395
|
|
|
|
|
Are you filling dropdown from DB or Static Values.
Please post your code for proper answer.
Best Regards,
Chetan Patel
|
|
|
|
|
Hi,
I'm filling the dropdown from DB. Please find below the code:
function AnalystKeyChange()
{
var tlList = document.getElementById("ddldataset");
//Getting the selected country from country combo box.
var SelectedAnalyst =tlList.value;
// URL to get states for a given country
var requestUrl = AjaxServerPageName + "?Selectedtxt=" + SelectedAnalyst;
CreateXmlHttp();
// If browser supports XMLHTTPRequest object
if(XmlHttp)
{
//Setting the event handler for the response
XmlHttp.onreadystatechange = HandleResponse3;
//Initializes the request object with GET (METHOD of posting),
//Request URL and sets the request as asynchronous.
XmlHttp.open("GET", requestUrl, true);
//Sends the request to server
XmlHttp.send(null);
}
}
//Called when response comes back from server
function HandleResponse3()
{
// To make sure receiving response data from server is completed
if(XmlHttp.readyState == 4)
{
// To make sure valid response is received from the server, 200 means response received is OK
if(XmlHttp.status == 200)
{
analystListItems(XmlHttp.responseXML.documentElement);
}
else
{
alert("There was a problem retrieving data from the server." );
}
}
}
function analystListItems(alNode)
{
var analystList = document.getElementById("ddlAnalystReportTo");
//Clears the state combo box contents.
for (var count = analystList.options.length-1; count >-1; count--)
{
analystList.options[count] = null;
}
var analystNodes = alNode.getElementsByTagName('analyst');
var textValue;
var optionItem;
//Add new states list to the state combo box.
for (var count = 0; count < analystNodes.length; count++)
{
textValue = GetInnerText(analystNodes[count]);
optionItem = new Option( textValue, textValue, false, false);
analystList.options[analystList.length] = optionItem;
}
}
Please let me if I have to proivde any more information. Thanks for all your help.
Meeram395
|
|
|
|
|
Hello all
I am developing a application in which user can purchase an
exam set. When he purchase it then he can take this exam at
any time. Every exam set include a set of 25 question and every
question having three default option.A,B,C.
I choose datagrid or datalist to display question ,their option
and provide paging to datagrid/datalist.On paging 2 i want to display
'FINISH TEST'(when he click on button he redirected to new page where
that user can see all test result and submit test) link or button which
is not displayed when user see first 13 question.How can i do this.
Please guide me to solve this.
Thanks.
Rahul.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
So just to confirm you want to have a button at the end of your datagrid on the last page allowing the user to click and go to another page?
|
|
|
|
|
Yes
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Not sure how to do this, you need to find a way of finding the last page or end row and then putting the button there
|
|
|
|
|
Ok thanks!
I will try it.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
error : URI formats are not supported
strPath = "http://localhost/website/Hamdler.ashx?ImgNo=121"
Bitmap objImage = new Bitmap(strPath);
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
You can not pass Web Url in strPath,
You have to use local path.
Best Regards,
Chetan Patel
|
|
|
|
|
but how i handle that situation
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
Hi all,
My Application gives me an error of type "Cast from type 'DBNull' to type 'String' is not valid" when some value in the select statement is stored as "<null>" in the SQL Server 2000.
How could I return a "<null>" value from database, or is there a way to convert a value stored as "<null>" to any other value (example: zero or space)???
this is the sql statement in my web application:
Dim com As New SqlClient.SqlCommand
Dim ds As New DataSet
Dim da As New SqlClient.SqlDataAdapter("select X, Y, Z from hotels where X=" & Me.Xtxt.Text, con)
da.Fill(ds, "hot")
Note: This statement has no errors and works fine when no column in the database has a value "<NULL>".
Kind Regards
OBarahmeh
Palestinian Central Bureau of Statistics (PCBS)
Ramallah-Palestinian Territory
modified on Wednesday, March 12, 2008 9:39 AM
|
|
|
|
|
Yes there is ways of converting the data once it is brought back from the database using c# code.
Can you explain more?
|
|
|
|
|
I can 100% sure that the above doent produce any error. you may use some varriable to assing the returned value. There only you will get these error. Use Not .DBNull("ColumnName") function while assinging the value to a string
|
|
|
|