|
The control is not enter into the Item command event. what to do?
|
|
|
|
|
Do you mean to say onclick of delete button it is not going into itemcommand event or what???
|
|
|
|
|
Yes. If the button is clicked i write a simple response.write inside the item command event. But it s not enter into the event? Is there anything to declare?
|
|
|
|
|
I think you just create that event again by deleting the existing one.
And in the repeater declare the button as below.
<asp:repeater id="rptrreview" runat="server" datasourceid="SqlDataSource1" onitemcommand="rptrreview_ItemCommand" xmlns:asp="#unknown">
<itemtemplate>
<asp:button id="btnDelete" runat="server" text="DELETE" commandargument="<%#bind(" username")"=""> />
then in the itemcommand event get the id of the row as below.
Button delete = (Button)rptrreview.FindControl("btnDelete");
string data = e.CommandArgument.ToString ();
If any problem let me know
|
|
|
|
|
Still its not working. I use sql data adapter instead of Sqldatasource. I got the datas from sql and display it. Error in xmlns. So i delete it. Is there is any problem?
|
|
|
|
|
Can you send me your code once.
|
|
|
|
|
Hi, Now its working. Thank u very much for your great help ! !
|
|
|
|
|
Hi all,
I am getting one error in my application which occur some time and some time that page work fine:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
N!dh!
|
|
|
|
|
Do you know how to configure Netowk load balancing ? I have some proble m I posted it here
http://forums.asp.net/t/1380017.aspx
|
|
|
|
|
No,i have no knowledge about this
N!dh!
|
|
|
|
|
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
Me.EnableViewState = False
divprojects.RenderControl(hw)
Response.Write(tw.ToString())
Response.End()
I'm using following codding for downloading dividion data into excel file that proper work into IE. but not in mozila, there saved as aspx page....
So what to do changes in following codding, please send me reply on my email id : pranav.kalayni@gmail.com
Name : Pranav Kalayni from Mumbai
|
|
|
|
|
I want to create e commerce web site using asp.net . for this I need
design and architecture documentation for refrence. It will really
helpful if any body have it. Thanks
sachin
|
|
|
|
|
i have some photos in my web site that i have uploded from ftp
when i want to delete these photos or overwrite thses photos then i got error access denied but photos that i have uploded from my site i wll be able to delete and overwrite why is it so
|
|
|
|
|
How to execute in ffmpeg in online server
|
|
|
|
|
Hi,
I need regular expression to validate input string which can not accept [()==<>'~!#$^%*=]+" and regular expression for float which can check if user enters more than four digit after decimal like 1111.12345 .
3333.222 – Valid
3333.1234566 – Invalid
Regards
Rajesh
rajesh
|
|
|
|
|
hello there,
i'm developing an editable grid user control in asp.net + vb.net, which i can use for my other projects as a control.
i' using a gridview control with Edit,update,delete,cancel image buttons. i wrote a template column class to generate gridview colums dynamically. the idea is to give flexibility to the programmers to add template columns dynamically (i.e. Textbox column, DDL Column, Checkbox Column etc.) according to the programming need.in my template column class i can set multiple FieldValidators for the column like RequiredFieldValidator, Range Validator etc.)
the problem that i'm facing is when i click on the row update button of gridview it validates the textbox in the column but when i click any control outside the grid or another row in the gridview by mouse then the validation don't fire.i want that the user should enter a proper value in the control or just cancel editing and while editing a row he should not be able to focus on any other control on the webpage.
can anybody help me in this regard.it's a bit urgent.
please reply considering i'm beginner to asp.net and vb.net.
Thanks in advance.
|
|
|
|
|
I have code asp.net:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
#translate
{
height: 290px;
width: 756px;
}
</style>
<script type="text/javascript">
function hienthi1()
{
var x=document.getElementById("translate").contentDocument.getElementById("text").innerHTML=document.getElementById("txt").value;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<iframe id="translate" runat="server" src="http://translate.google.com.vn">Google dịch anh việt</iframe>
<br />
<input type="text" id="txt" value="ABC" runat="server" /><br />
<span id="span" runat="server"></span><br />
<asp:textbox id="TextBox1" runat="server" height="76px" width="754px" xmlns:asp="#unknown"></asp:textbox>
<br />
<input type="button" onclick="hienthi1();" value="Xem" />
</form>
</body>
</html>
But I amnot sussessful!
Help me!
|
|
|
|
|
[when the session is null we are by default directed to home page.]
At first when we login and perform transactions we carry the session values from one page to second page.At this second page if we remain idle for some time, the session automatically clears off. This causes us to reach back to home page . How to avoid this?
We have included the following code in the web.config file,but still we are having the same problem.
<system.web>
<sessionstate timeout="1000">
|
|
|
|
|
apart from web.config you also to need to make changes in IIS
|
|
|
|
|
hi,
the default time out for session is 20 sec r 5 min pertains up on the versions.Dont use it on webconfig.use the session code at global.asax file.Let me know if u don know the script.i hope U could try it.
Ramprathap S.S
|
|
|
|
|
deepthy.p.m wrote: following code in the web.config
What ?
The behavior as per design I guess.Your sessions might be timing out.
Read this [^]
And many more:[^]
|
|
|
|
|
Assume Page A calls Page B and you dont want to go back from page B to Page A. Simply include this code in Page A.
javascript:window.history.forward(1);
i use this code wat if i want to come back to a from any other page this is also not possible pls help..
|
|
|
|
|
Protected Sub cmdOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdOk.Click
Dim str As String = ""
str = ConcatAirCode()
cmdOk.OnClientClick = "Done('" & str & "','" & strTextId & "')"
End Sub
I did this in code behind because i need to pass two variables in my Js function Done.
It works but requires two clicks as it is posting the page on the first click.
Any one got the way around it.
|
|
|
|
|
hi guys i'm developing a web application using n-tier archi i.e (4 tiers).
currently i'm facing problem in assigning the values to the labels which is present in a gridview and its a Template field, i'm enclosing the coding part where i'm facing the problem, i would appreciate any suggestion to solve this...
code runs here......
private void l_DataBinding(Object sender, EventArgs e)
{
_objActiveInpatient = new ActiveInpatient();
// get the control that raised this event
Label l = (Label)sender;
// get the containing row
GridViewRow row = (GridViewRow)l.NamingContainer;
// get the raw data value and make it pretty
string RawValue =DataBinder.Eval(row.DataItem,columnName).ToString();
//// I AM GETTING EXCEPTION IN THE ABOVE LINE SAYING DataBinding: 'MediQMBELib.BusinessEntityCollection`1[[MediQMBELib.ActiveInpatientReports.ActiveInpatient, MediQMBELib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' does not contain a property with the name 'PatientName'.
switch (dataType)
{
case "DateTime":
l.Text = String.Format("{0 : d}", DateTime.Parse(RawValue));
break;
case "Double":
l.Text = String.Format("{0 : ###,###,##0.00}",
Double.Parse(RawValue));
break;
case "Int16":
case "Int32":
l.Text = RawValue;
break;
case "String":
l.Text = DataBinder.Eval(row.DataItem,columnName).ToString();
break;
}
}
BUT THE PROBLEM IS THE FILE IT IS REFERRING FOR THE PROPERTY IS NOT CORRECT, AS ITS SEARCHING IN DIFFERENT .CS FILE, I'M UNABLE TO UNDERSTANDING WHY THE CONTROL IS PASSING TO DIFFERENT FILE RATHER THAN THE ACTUAL BUSINESS LAYER FILE...
ONE MORE THING I'D LIKE TO MAKE IT CLEAR THAT I'M GETTING COLLECTION OF OBJECTS i.e 2 ROWS IN THAT ROW.DATAITEM AND I'M TRYING TO ASSIGN IT TO A STRING RAWDATA BUT, I NEED SOLUTION HERE SO THAT I CAN ASSIGN THE TEXT TO THE LABEL....
I WOULD BE VERY HAPPY IF SOME ONE PUTS LIGHT ON THIS......
|
|
|
|
|
Have you checked in the debugger what the type of row.DataItem is ? I think it's probably not what you expect it to be.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|