Click here to Skip to main content
15,914,403 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDigital Certificate Pin
hariram283-Apr-07 0:21
hariram283-Apr-07 0:21 
AnswerRe: Digital Certificate Pin
Sathesh Sakthivel3-Apr-07 0:35
Sathesh Sakthivel3-Apr-07 0:35 
QuestionCross Script Attacks Pin
BobsAfro2-Apr-07 23:47
BobsAfro2-Apr-07 23:47 
AnswerRe: Cross Script Attacks Pin
blue_arc3-Apr-07 1:07
blue_arc3-Apr-07 1:07 
GeneralRe: Cross Script Attacks Pin
BobsAfro3-Apr-07 1:08
BobsAfro3-Apr-07 1:08 
AnswerRe: Cross Script Attacks Pin
Paddy Boyd3-Apr-07 1:59
Paddy Boyd3-Apr-07 1:59 
QuestionReading Emails From exchange in aspx page Pin
samerh2-Apr-07 23:14
samerh2-Apr-07 23:14 
QuestionHow to get textbox value inside a gridview? Pin
irkahc2-Apr-07 22:43
irkahc2-Apr-07 22:43 
Hi my problem is:

there is a linkbutton called samplesGiven. If I click on SamplesGiven Linkbuton gridview should appear. Grrid has three columns.. SKUName, Quantity and UOM.. SKUName is binding from database.. I made Quantity and UOM as templatefields each has textbox and dropdownlist respectively.. Now I entered some values in Quantity Textbox and selected item frorm Dropdown list.. If I click Insert button I have to access values of those controls.. pls see the following code. it is giving null always.

<asp:View ID="View4" runat="server">
<h4>Samples</h4>
<asp:GridView ID="gvInsSamples" runat="server" AutoGenerateColumns="False" DataKeyNames="SKUId"
DataSourceID="SKUMasterSource" SkinID="GridView">
<Columns>
<asp:BoundField DataField="SKUId" HeaderText="SKUId" InsertVisible="False" ReadOnly="True"
SortExpression="SKUId" />
<asp:BoundField DataField="SKUName" HeaderText="SKUName" SortExpression="SKUName" />
<asp:TemplateField HeaderText="Quantity">
<ItemTemplate>
&nbsp;<asp:TextBox ID="txtQuantity" runat="server" Height="15px" Width="78px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="UOM">
<ItemTemplate>
&nbsp;<asp:DropDownList ID="ddlUOM" runat="server" DataSourceID="UOMMasterSource" DataTextField="Description"
DataValueField="UOMId" SkinID="DropDownList">
</asp:DropDownList><asp:ObjectDataSource ID="UOMMasterSource" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetAllRecords" TypeName="ActNexxt.ActNexxtDataSetTableAdapters.UOMMasterTableAdapter">
</asp:ObjectDataSource>
</ItemTemplate>

</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Button ID="btnSamplesInsert" runat="server" SkinID="Button" Text="Insert" OnClick="btnSamplesInsert_Click" /></asp:View>


codebehind file:
protected void btnSamplesInsert_Click(object sender, EventArgs e)
{
int i = 0;
int skuid;
int quantity;
gvInsSamples.Columns[0].Visible = true;
gvInsSamples.DataBind();
TextBox tb;
foreach (GridViewRow row in gvInsSamples.Rows)
{
skuid =Convert.ToInt32(row.Cells[i].Text);
// tb = ((TextBox)row.FindControl("txtQuantity"));
string textBoxText = ((TextBox)row.FindControl("txtQuantity")).Text; // it is returnig null always..
// quantity = Convert.ToInt32(tb.Text);
}
}
AnswerRe: How to get textbox value inside a gridview? Pin
Vinay Dornala2-Apr-07 23:29
Vinay Dornala2-Apr-07 23:29 
GeneralRe: How to get textbox value inside a gridview? Pin
irkahc3-Apr-07 0:08
irkahc3-Apr-07 0:08 
AnswerRe: How to get textbox value inside a gridview? Pin
Vinay Dornala3-Apr-07 0:04
Vinay Dornala3-Apr-07 0:04 
GeneralRe: How to get textbox value inside a gridview? Pin
irkahc3-Apr-07 1:17
irkahc3-Apr-07 1:17 
Questionhttp to https Pin
pradeep kumarappagari2-Apr-07 22:05
pradeep kumarappagari2-Apr-07 22:05 
AnswerRe: http to https Pin
just3ala22-Apr-07 22:49
just3ala22-Apr-07 22:49 
GeneralRe: http to https Pin
pradeep kumarappagari2-Apr-07 22:58
pradeep kumarappagari2-Apr-07 22:58 
AnswerRe: http to https Pin
blue_arc3-Apr-07 1:12
blue_arc3-Apr-07 1:12 
GeneralRe: http to https Pin
blue_arc3-Apr-07 1:15
blue_arc3-Apr-07 1:15 
Questiondate validation in javascript Pin
sra222-Apr-07 21:38
sra222-Apr-07 21:38 
AnswerRe: date validation in javascript Pin
varshavmane2-Apr-07 22:27
varshavmane2-Apr-07 22:27 
GeneralRe: date validation in javascript Pin
sra222-Apr-07 22:44
sra222-Apr-07 22:44 
GeneralRe: date validation in javascript Pin
just3ala22-Apr-07 22:48
just3ala22-Apr-07 22:48 
AnswerRe: date validation in javascript Pin
Vinay Dornala2-Apr-07 22:56
Vinay Dornala2-Apr-07 22:56 
Questionhow to display deails in notepad Pin
Sophia Rekhi2-Apr-07 21:38
Sophia Rekhi2-Apr-07 21:38 
AnswerRe: how to display deails in notepad Pin
just3ala22-Apr-07 22:48
just3ala22-Apr-07 22:48 
GeneralRe: how to display deails in notepad Pin
Sophia Rekhi2-Apr-07 23:43
Sophia Rekhi2-Apr-07 23:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.