|
Hi Bright thanks for ur reply:
see i did like the following code,but its comparing with the datatable last value only,
whats wrong in my code?
For Each gvr1 As DataGridItem In SubGRD.Items
Dim pno As Integer = Val(gvr1.Cells(0).Text)
Dim cb As CheckBox = CType(gvr1.FindControl("chk1"), CheckBox)
For Each dr As DataRow In dt.Rows
If (dr("pageno").Equals(pno)) Then
cb.Checked = True
Else
cb.Checked = False
End If
Next
Next
Help me
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
You should be comparing the selected value against the DataRow with the same RowIndex rather than checking against each DataRow. This is the reason you see it comparing against the last value only.
|
|
|
|
|
I want to make connection to Sql server 2005 by using XML file (defining connection string in xml file). I am using ASP.Net 2.0. How can i use xml node on UI?
Respond me soon.
|
|
|
|
|
Kapil Chauhan wrote: defining connection string in xml file)
web.Config file or some external XML file ? If it is in web.config, you can fetch it using ConfigurationManager.AppSetting . If it is external XML file, use XMLTextReader/XMLDocument etc.
|
|
|
|
|
hi,
hw do i create a drop down menu using asp.net with VB? for example, i want a file, edit etc kind of tool bar / drop down menu.
does anyone have any sugeestions or example code for this and maybe the functionality of such features like how to open a file, cut copy and paste.
thanks
|
|
|
|
|
Buy a book on ASP.NET, you obviously have no idea how it works. You can do menus in javascript ( but not in VB, that runs on the server ), but you can't open files, cut, copy or paste within a web app.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hai
I have a word template which has following format.
Heading1
*Desc1
Heading2
*Desc2
Heading 3
*Desc3
i have an Desc1,Desc2,Desc3 in different tables in a database(SQLServer2000). I want to merge databasefield with the template
with the help of asp.net 2.0 with C#.
thanks in advance
|
|
|
|
|
hi all
How can i use Regex character to A-Z, a-z 0-9
If my string is utf-8 is error
ex "â bo" will is error
|
|
|
|
|
if ur string is utf-8
then expression should be [a-zA-Z]*-[0-9]*
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Sonia Gupta wrote: if ur string is utf-8
then expression should be [a-zA-Z]*-[0-9]*
why - ?
|
|
|
|
|
AnhTin wrote: How can i use Regex character to A-Z, a-z 0-9
What is regex character ? Do you want to match A-Z, a-z 0-9 ? then use
[\w]*
|
|
|
|
|
Thanks reply
But if my character is "â" or "â". that all is nvarchar but i want my string only varchar
|
|
|
|
|
iam having a grid view with text boxes whic are not editable i kept onkey press retunf false ..now its working fine not to edit the textbox but if i click on the text box cursor is comming in the text box how this cursor can be stopped
|
|
|
|
|
set the text box as readonly or enabled = false
|
|
|
|
|
put the textbox as readonly.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Hi All...
Can any body say how can we ajaxify the exsiting ASP.Net Site using vb?
We need a timer that ticks for every second....but the page is flickering for every second(i put timer interval as 1000ms)...
Can any body help us out plllllzzz......
Thanks in advance
Regards
Nanda
Abhishek
|
|
|
|
|
Continues from this post[^] ~
How did you use the UpdatePanel? You should not put the whole body into the UpdatePanel.
Take a lot this link[^]
According this example, the label should be placed in UpdatePanel. If you have some more controls in that page, you shouldn't put all of them in UpdatePanel.
|
|
|
|
|
Member 4648491 wrote: Can any body say how can we ajaxify the exsiting ASP.Net Site
AJAX is just javascript. If you are talking about MS Ajax toolkit, you need to make lot of changes in web.config file. Easy way would be creating a new AJAX enabled website and copying the web.config entries to your current web.config.
|
|
|
|
|
Don't ask the same things over and over. The question made no sense when you first asked it, and it still doesn't. A timer is javascript, it doesn't need ajax. The page will not flicker if you use AJAX. Try sticking to one thread, and explaining yourself.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all
i have a link button to add records and a dropdown list filled with data from a stored procedure and i have added "All" with index 0 at the top of the DDL.
i need a validator to prevent entering insert page unless the user chooses a value from the DDL other than "All"
i have used the following validator but not working
<asp:DropDownList ID="ddlName" runat="server" AutoPostBack="True" Width="470px"><br />
</asp:DropDownList><br />
<asp:CompareValidator ID="nameVal" runat="server" ControlToValidate="ddlName"<br />
Display="Dynamic" ErrorMessage="Please chose a name." Operator="NotEqual" Type="Integer" ValueToCompare="0">*</asp:CompareValidator>
Any ideas!!!
|
|
|
|
|
samerh wrote: ValueToCompare="0">
What about changing 0 to "All"?
|
|
|
|
|
Didnt work too! Any other ideas.
I want the validation to alert me when i press the link button and iam choosing "All" that has index 0 from the DDL.
May be a java script will do it!!! Iam just wondering!!!
|
|
|
|
|
u should use the javascipt , there detect the dropdownlist id and find the current index , if the index is 0 then alert the user to select other then all.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
I have tested. It works.. Can you try it again? Let's say there is one dropdownist and comparevalidator in your page. Set like that "ControlToValidate="DropDownList1"" and "ValueToCompare="All"" in CompareValidator.
<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>]]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:dropdownlist id="DropDownList1" runat="server" autopostback="True">
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
</asp:dropdownlist>
<asp:comparevalidator id="CompareValidator1" runat="server" errormessage="CompareValidator">
ControlToValidate="DropDownList1" ValueToCompare="All"></asp:comparevalidator>
</div>
<asp:button id="Button1" runat="server" text="Button" />
</form>
</body>
</html>
Write the following code in Server-side. (Note that I used the arraylist in that sample. You can still use DDL instead of ArrayList.)
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections;
public partial class _Default : System.Web.UI.Page
{
ArrayList al = new ArrayList();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack) {
al.Add("All");
al.Add("Michael Sync");
al.Add("Nav");
al.Add("Dave");
al.Add("Toolbox");
DropDownList1.DataSource = al;
DropDownList1.DataBind();
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) {
}
}
Run the webproject.. Select "Nav" and click "Button". then, you will get the error as the way it should be. And select "All" and click "button". there won't be any error. I hope this is what you want.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
|
|
|
|
|
Hi Everybody,
I am developing a weblproject in C# using .net2005.
In my page i have a Gridview, some text boxes, dropdown lists to enter data and a button to create a new row in the Grid.
The functionality is when user enters data in the textboxes and selects using dropdown and he has to click create button to create a new row in the Grid.
It is working fine when user clicks the create button once.
When user clicks the button multiple times (continously) then that no of data rows are creating in the gird. Here i need only one row in the Grid.
How can i overcome this problem.
Thanks in Advance
Ramu
|
|
|
|