|
thanks for the reply, i will try this.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sonia Gupta wrote: NavigateUrl="<%# "default2.aspx?id=" + DataBinder.Eval(Container.DataItem,"Sub_Category_ID")%>"
NavigateUrl = "default2.aspx?id=<%# DataBinder.Eval(Container.DataItem,"Sub_Category_ID")%>"
Try this.
|
|
|
|
|
Dear Friends,
I have a web application,in which I need a paging in Grid view which has to have following output:
First Prev 1 2 3 4 5 Next Last
I have done Paging with the following format-
1 2 3 ... >>
or
<< ... 2 3 4
But can anyone help me ,how to show numeric links,also limited no. of numeric links can be visible(3 ta a time) with string values.
Thanking You
sanjay kumar samantaray
|
|
|
|
|
My suggession is you can add link buttons for first,next,previous and last in the footer and write appropriate codings.
If there is any other option means please tell me also.
VanithaVasu
|
|
|
|
|
i have a master page and content page in content page i have a girdview inside gridview headerRow i have CheckBox and checkbox column when user click header checkbox then allcheck box in the column should check and when header checkbox uncheck then all checkbox in the column should uncheck.
|
|
|
|
|
public void Checkbox_CheckedChanged(object sender,System.EventArgs e)
{
CheckBox chkbx=new CheckBox();
chkbx=(CheckBox)sender;
if(chkbx.Checked==true)
{
foreach(DataGridItem dgi in DataGrid1.Items)
{
((CheckBox)dgi.FindControl("check")).Checked=true;
}
}
else if(chkbx.Checked==false)
{
foreach(DataGridItem dgi in DataGrid1.Items)
{ ((CheckBox)dgi.FindControl("check")).Checked=false;
}
}
}
And The Html Code Should Be
<asp:DataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 136px" runat="server">
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<asp:CheckBox Runat="server" AutoPostBack=True Checked="False"
OnCheckedChanged="Checkbox_CheckedChanged"></asp:CheckBox>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID=check Runat="server"></asp:CheckBox> </ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
I think this code helps you.
VanithaVasu
|
|
|
|
|
Hi,
I have downloaded Visual Studio Beta 2, and I need a program to open it up. It has a .img extension. Please can someone advise?
Regards
ma se
|
|
|
|
|
|
HI!
Dear i have three textbox (textbox1,textbox2,textbox3) and three button (button1, button2, button3) on my web page now i want when i type some text in textbox1 and press enter then button1 press and when i type some text in textbox2 and press enter then button2 press without clicking by the Cursor on button Please help me...
|
|
|
|
|
ASP.NET will show weird results when pressing enter key. In classical ASP programming this can be achieved by putting different forms for controls. But by generally ASP.NET won't support multiple server forms. So you need to go with some javascript. I have documented this problem clearly here[^]. You can use the class library provided with the article.
|
|
|
|
|
Can install .net 2005 and sql server 2005 in my vista home basic platform
sarith
|
|
|
|
|
Hi friends
I want to convert HTML content to PDF file
Is it possible?
Thanks in advance
Pathan
---------------------------------------------------
|
|
|
|
|
No predefined libraries available. You will get some third party libraries. Check in sourceforge.
|
|
|
|
|
Can I export gridview data?
---------------------------------------------------
|
|
|
|
|
Hi plz see the following code:
I am getting error as "Value cannot be null. Parameter name: dataSet" at the place i have mentioned with bold letters...,
For Each Maingrd As DataGridItem In dgrdmain.Items
Dim chk As CheckBox = CType(Maingrd.FindControl("chk"), CheckBox)
If chk.Checked = True Then 'checked true
Dim eid As Integer = Maingrd.Cells(1).Text
Dim sdloan As Double
Dim sdinstall As Integer
If Val(Maingrd.Cells(29).Text) <> 0 Then
mySqlDataAdapter = New SqlDataAdapter("Select top 1 * from tblsalarydetails where empid='" & _
eid & "' and (datepart(yyyy,edate) < '" & Val(ddlYears.SelectedItem.Value) & "' or (datepart(yyyy,edate) = '" & _
Val(ddlYears.SelectedItem.Value) & "' and datepart(mm,edate) <= '" & Val(ddlMonth.SelectedItem.Value) & "')) order by edate desc", sqlconn)
mySqlDataAdapter.Fill(myDataSet, "tblSalaryDetails")
If (myDataSet.Tables("tblSalaryDetails").Rows.Count) > 0 Then
If TypeOf (myDataSet.Tables(0).Rows(0)(27)) Is DBNull Then
sdloan = 0
Else
sdloan = Val(myDataSet.Tables(0).Rows(0)(27))
sdloan = sdloan + Val(Maingrd.Cells(29).Text)
End If
If TypeOf (myDataSet.Tables(0).Rows(0)(30)) Is DBNull Then
sdinstall = 0
Else
sdinstall = Val(myDataSet.Tables(0).Rows(0)(30))
sdinstall = sdinstall + 1
End If
End If
sqlCmd = New SqlCommand("update tblsalarydetails set loan='" & sdloan & "',Installment='" & _
sdinstall & "' from (Select top 1 * from tblsalarydetails where empid='" & _
eid & "' and (datepart(yyyy,edate) < '" & Val(ddlYears.SelectedItem.Value) & "' or (datepart(yyyy,edate) = '" & _
Val(ddlYears.SelectedItem.Value) & "' and datepart(mm,edate) <= '" & _
Val(ddlMonth.SelectedItem.Value) & "')) order by edate desc) as th where dbo." & _
"tblsalarydetails.edate = th.edate and dbo.tblsalarydetails.empid=th.empid", sqlconn)
sqlCmd.Connection.Open()
sqlCmd.ExecuteNonQuery()
sqlCmd.Connection.Close()
sqlCmd.Dispose()
sqlCmd = New SqlCommand("delete tblmonthsalary where projectid='" & _
Val(ddproject.SelectedItem.Value) & "' and eid='" & eid & "' and Smonth = '" & _
Val(ddlMonth.SelectedItem.Value) & "' and syear='" & Val(ddlYears.SelectedItem.Value) & "'", sqlconn)
sqlCmd.Connection.Open()
sqlCmd.ExecuteNonQuery()
sqlCmd.Connection.Close()
sqlCmd.Dispose()
mySqlDataAdapter.Dispose()
Else
exit sub
End If
End If 'Checked end
Next
Regards,
Magi
|
|
|
|
|
U cannot fill the dataset with null value of dataadapter.
the problem is with retrieving top value.
mySqlDataAdapter = New SqlDataAdapter("Select top 1 * from tblsalarydetails where empid='" & _
eid & "' and (datepart(yyyy,edate) < '" & Val(ddlYears.SelectedItem.Value) & "' or (datepart(yyyy,edate) = '" & _
Val(ddlYears.SelectedItem.Value) & "' and datepart(mm,edate) <= '" & Val(ddlMonth.SelectedItem.Value) & "')) order by edate desc", sqlconn)
mySqlDataAdapter canot be null
Sarith...
|
|
|
|
|
Hi i have checked that query...,
It's contained value...,
But i am getting that error...,
Thast y i given my full code on there...,
Regards,
Magi
|
|
|
|
|
Hi all,
Can we change the position of controls in clientside.
consider in an example.
In panel1 their is textbox firstname
panel2 their is textbox lastname next to this thier is a button btnup
if user clicks button btnup then
The panel2 i.e textbox lastname has to move to position of panel1(top) and panel1 has to come below panel2..
lastname has to come first and firstname has to come below..
thanks in advance
santosh
|
|
|
|
|
This can be done by AJAX more suitably
but if you want to do with javascript you can do
you want to do at client side :-
Then add one more panel with textbox ,...
hide first panel and show third one after button click
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
How can i include files when i have a master page?
Here is the logic:
Page 1 -------------> Page Check ------------> Page 2
Now, before the user can go to Page 2 it must be check first if the user has the rights to the page...
I have a master page which confuses me. Anyone knows how to tackle this?
|
|
|
|
|
Your page will be in the Master page content place holder
put your all validatiion in the page 1 event (When you want to check )
master page should contain only the common things that you want to show in your application such as header footer Menu etc
Google Master page that will more helpfull for you
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi All,
I am programmatically creating a datagrid bound columns (in ASP.NET 2.0). During initial page load there is no problem but after the postback i am getting following error.
Error Start --------------
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Error End --------------
I know that in order to avoid event validation we can set the following parameters in the config file.
enableEventValidation="false" validateRequest="false"
but since there can be a risk of a hole in the security i do not want to go with that.
Hence i am using the following code to register my event during page render stage.
protected override void Render(System.Web.UI.HtmlTextWriter e)
{
foreach (Control control in this.Controls)
{
Page.ClientScript.RegisterForEventValidation (control.UniqueID);
}
foreach (DataGridItem grdRow in grdvwCheckbox.Items)
{
Page.ClientScript.RegisterForEventValidation(grdRow.Cells[0].UniqueID);
}
base.Render(e);
}
Since i am getting following error in the trace.
Error Start--------------
[ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +2080220
System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +106
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +32
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Error End -------------
I suppose that there is a problem with the item command buttons in the datagrid (Cell[0]). Hence i am registering those buttons also but still i am getting the error message.
I also have 2 hidden fields but since i am registering all the controls guess that should not create any problem.
Please let me know where am i going wrong.
Regards,
Anees
|
|
|
|
|
am having the problem when retreving data from database.
i hav a value in database "page'3.aspx". single quotes is there.
i retrieve it and displays it in a datagrid as a link.The link displays like page'3.asp but the problem is with link doesnt have that single quotes. that is when i click that link it goes to page3.appx
How can i solve this problem.please help me
Sarith
-- modified at 3:24 Thursday 9th August, 2007
|
|
|
|
|
whats the purpose of putting a single quote? (page'3.aspx) and storing it on your database? i mean why would you something like that?
|
|
|
|
|
sarithka wrote: The link displays like page'3.asp
It's not displaying like page'3.aspx ?
sarithka wrote: page3.appx
APPX ? Explain your problem clearly.
|
|
|
|