|
this problem can be solved by using timespan
specify,
TimeSpan ts = outtime.Subtract(intime);
|
|
|
|
|
Good morning!!
I have used one user control on number of pages in a Project,developed in c# using Asp.net 2.0.
There are number of LinkButtons used on the user control, but on one page click events of the LinkButtons are not fired .
None of the button is clickable.
Why it is happening so ?
Can somebody help me out ?
Thank you.
following is code snippet
.aspx contents of User Control =>
<asp:linkbutton id="lbtnFeedback" runat="server" cssclass="link_small_pink_question" style="position: relative; left: 14px" onclick="lbtnFeedback_Click">
aspx.cs contents of User Control=>
protected void lbtnFeedback_Click(object sender, EventArgs e)
{
try
{
Session["SellerID"] = SellerId;
Session["ShopId"] = shopID;
Response.Redirect("MCBioFeedback.aspx", false);
}
catch { }
}
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
User Control file name should be ascx instead of aspx
Are you putting right Id of control in aspx
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
thanks for replying
extension file is ascx.
The control is working fine on other pages but on one page it has stopped working at all.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
If the user control is working fine in other pages and its events are called properly then might be the problem in aspx page only
See the Register tag and id given to control on aspx should match with aspx.cs page .
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
How many languages .NET is supporting now i searched on net but i didnt get correct solution to this question.it wuld b very helpful if any one can answer this question
Thanks in advance
|
|
|
|
|
|
Hi,
One requirment in ASP.NET web application that to call and use the form and its controls, developed in Window-based C#.
please help.
Thanks & regards
|
|
|
|
|
hi friends
i have on user control
on this i have one dropdownlist control
on change of this control i am filling datagrid contents using ajax
in datagrid i have one template column in template column's item template i have link button
on click of link button i have to fill some other details
my problem is
when i am filling datagrid contents using ajax
i am not able to handle template columns link button
how can i add link button to datagrid
using ajax
when ever onchange of dropdown list control fires
link button gets disapper
how can i solve this
thanks
|
|
|
|
|
Show me the code for filling datagrid using ajax.
|
|
|
|
|
can i get session variables to a modal dialoug box?
i create a page for modal dialoug and try to get session variables from there..but i didt got the variables..
can i get it?
if not how can i pass a variable from one aspx page to modal dialouge other than 'querystring'..
thks
yesu
|
|
|
|
|
ypki wrote: can i get session variables to a modal dialoug box?
I think you can. Tell me how you are showing modal dialog box ?
|
|
|
|
|
i have a parent page parent.aspx..when i click a link in a datagrid of that page a modal dialouge will open using showModalDialoug in javascript,its name child.aspx..
i cant get the session variables in that child.aspx
my code in parent.aspx is
Session("ForcastID") = 11
Session("ForcastType") = "s"
Response.Write("window.showModalDialog('child.aspx', 'Info', 'status=1, top=100, resizable=no, left=300');")
this will open child.aspx from parent.aspx
the values of session variables in child.aspx shows "Nothing"
|
|
|
|
|
ypki wrote: Session("ForcastID") = 11
Session("ForcastType") = "s"
Response.Write("window.showModalDialog('child.aspx', 'Info', 'status=1, top=100, resizable=no, left=300');")
it is not the problem of modaldialog. Try to comment the response.write. Then page will be posted back and session will be created. Now make the url in address bar as child.aspx ? Check whether you are getting session ? If you are getting then you can identify where is the problem.
|
|
|
|
|
|
Hi,
I have to write a page which receive a QueryString named LanguageID. In its Load event, after getting this parameter, I must remove it from the Request object. The reason is when the page is shown, and the user press F5 KEY (for example), the page will be refreshed without the QueryString LanguageID (This parameter is used only one time). I can image the scenario is like following:
Sub Load()
If not Request.QueryString("LanguageID") is Nothing then
strLanguageID=Request.QueryString("LanguageID")
Request.QueryString.Remove("LanguageID")'This line didn't work, the error is that the collection is read-only
Else
strLanguageID=GetLanguageIDFromDatabase()
End If
'Do other works
End Sub
How can I solve this problem? Any one can help me? Thanks.
|
|
|
|
|
Hi
Redirect to the same page after checking for querystring value. For example:
if (!IsPostBack)
{
if (Request.QueryString["test"] != null)
{
Response.Redirect("child.aspx");
}
if (Request.QueryString["test"] == null)
{
Response.Write("Query string is null");
}
}
Or, maintain in a session variable before redirecting to a child page. You can kill the session in the child.aspx.
Harini
|
|
|
|
|
|
Is there any reason why this code that worked in ASP.net 2.0 wouldnt work in ASP.NET 1.0 ?
(or am I going nuts ?...)
I am trying to set a value on an ascx usercontrol from its parent page
ascx code:
// this allows the page to set the name of the last CSR to work the customer
private string LastCSRName = "";
public string LastCSRNameMethod
{
get
{
return LastCSRName;
}
set
{
LastCSRName = value;
}
}
aspx code:
ReportsHeaderUrgent1.LastCSRNameMethod = Convert.ToString(DataBinder.Eval(SecondReturnedDataset, "Tables[rows].DefaultView.[0].CSRName"));
|
|
|
|
|
What error you are getting ?
|
|
|
|
|
Yes that would help huh
The error I get for the line in the aspx code is:
The type or namespace name 'ReportsHeaderUrgent1' could not be found (are you missing a using directive or an assembly reference?)
|
|
|
|
|
:(hello i use asp.net vs 2003. i tried reading from an xml file located on my drive but received access error every time. i created a dll file of a .cs class but whenever i tried to use after refrencing it,importing its namespace, and creating an instance of its class the dll found out the dll 's got nothing in it through object browser but when i use ildasm utility i get to see my class and methods in it . any help guess i cant work with filesystem. note i have imported allmost all namespaces.
and please i need a genuine log in script and how to make configure web.config to respond to it just not gettin it.
shawn
|
|
|
|
|
Since the asp.net by default runs under the aspnet user you need to give the machine user read and write access to where ever the xml file is. You also must give the IIS_WPG group read and write access.
I have recently written an article on dynamic web.config stuff, but it is for VS 2005. Here is the link anyway:
http://www.codeproject.com/useritems/SingleWebConfigFile.asp[^]
Hope that helps.
Ben
|
|
|
|
|
:(hello. i have an registration image on my registration page but the strings on it arent validating with onclick of the button. guess the strings on the image is refreshing itself without displaying the new random string in the image there by not moving i even tried calling the saved one from the directory to validate with it but not working.
shawn
|
|
|
|
|
Hi all,
Iam using form authentication in my web app. After user login i want to redirect depends on user info.
My problem is :
User.Identity.name is blank in login page but its working fine in other page.
Forms Authentication in web.config file
<authentication mode="Forms">
<forms name="Authcookie" loginurl="LogIn.aspx" protection="All">
private
void btnlogin_Click(object sender, System.EventArgs e)
{ if(checking User credentials)
{ Id=somevalue;
FormsAuthentication.SetAuthCookie(Id.ToString(),false);
Response.Write(User.Identity.Name.ToString());
//Response.Write(Context.User.Identity.Name.ToString());
}
}
pls help me...
|
|
|
|