|
I m generating textboxes in the panel
|
|
|
|
|
i have tried the below code and i am getting the text from the text box.
i have generated the Textboxes in page_Load
and accessed the textbox text on button_Click
<table>
<tr>
<td colspan="2">
<asp:Panel ID="Panel1" runat="server" Height="200px" Width="125px">
</asp:Panel>
</td>
</tr>
<tr>
<td style="width: 100px">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /></td>
<td style="width: 100px">
</td>
</tr>
</table>
Code.
protected void Page_Load(object sender, EventArgs e)
{
for (int i = 0; i < 4; i++)
{
TextBox t = new TextBox();
t.Width = Unit.Pixel(160);
t.Height = Unit.Pixel(22);
Panel1.Controls.Add(t);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string str = "";
foreach (Control ctrl in Panel1.Controls)
{
if (ctrl is TextBox)
{
TextBox t = (TextBox)ctrl;
str = t.Text;
}
}
}
i am getting the text i entered in the textboxes. In your case implement it as you required.
|
|
|
|
|
|
Did you deployed your site properly ? What is the .NET Framework version set in IIS ?
|
|
|
|
|
I develop this website using VS.net 2008, I does not put it on wwwroot or using IIS folder
modified on Wednesday, July 8, 2009 3:02 AM
|
|
|
|
|
Do you have any idea , How to Create Excel File and Adding multiple Tabs init without adding Reference of Microsoft.Office.Interop.Excel in our web application?
Is there another way to do the same thing without adding DLL reference?
|
|
|
|
|
hi,
Im trying to read word document located at client machine in asp.net 1.1
can anybody help!
thanks in advance!
|
|
|
|
|
Spurple wrote: Im trying to read word document located at client machine in asp.net 1.1
You can't!
|
|
|
|
|
Spurple wrote: Im trying to read word document located at client machine in asp.net 1.1
Java Script does not have the sufficient right to do this.
Probably ActiveX can be a alternative solution. But it will work only on IE
|
|
|
|
|
hi,
I have a dynamically created control by javascript.I have to use the value of the control.so I have to pass the value from javascript to c#.How can I do this?
reagards
Bill
|
|
|
|
|
Hi
Put the value of your control in hidden field and use it in c# code.
himanshu
|
|
|
|
|
hi..
in my page n number of fields are there.user may enter some fields maynot enter some fields.so i am not using required field validator.I just want to check with valuetype.so i am using regular expression validator for name to allow lower & upper case letters and space,' etc.see code below.
i am entering only those letters only eventhough error message is coming.why??<br />
<td align="left"> <asp:TextBox ID="fname" runat="server" ToolTip="First Name" MaxLength="15" CssClass="textbox" /></td><br />
<br />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" SetFocusOnError="true" Display="Dynamic"<br />
ControlToValidate="fname" ValidationExpression="[a-zA-Z''-'\s]" ErrorMessage="invalid entry"></asp:RegularExpressionValidator>
|
|
|
|
|
Your regular expression probably demands a value. You need to create a regular expression that will pass on an empty input as well as any valid filled in input.
|
|
|
|
|
There is a property on these validators, it's something like 'validateifempty'. I forget the name, but I think that's what you need.
Oh, it looks to me like your regex is for only one character. I think you need a * after it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hey thanx..its working after adding * to my expression..i did basic mistake..
|
|
|
|
|
Hey i got one more QQ.is there any property for validation like when the user enters into name textbox..when he type numbers it shouldn't print on the page..for numbers it shouldn't display anything..when the user type alphabits name textbox field should display the letters..what ever the expression we gave those letters should print...
any property?? other way of validating??
|
|
|
|
|
hey i solved with ajax toolkit...
|
|
|
|
|
Hello,
I was looking on the web to find any samples that walk you through doing this in C#....I don't even see it on webSupergoo's website (the cretor of abcPDF)
I need to be able to convert documents (could be any format really) dynamically into PDF before they are sent to a Adobe server for annotations and stuff using Adobe LifeCycle Reader extensions.
Note: I cant use adobe to perform this conversion though!
Any help would be appreciated!
Thanks
Tina
|
|
|
|
|
Well there are many products available in market to do these kind of stuff.
Aspose [^]has one of the very nice pdf converter.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks for the response Manas...but it doesnt look like it suports tifs and Jpg images conversion. From what i can tell, it only supports microsoft office related formats.
Any other thoughts anyone?
|
|
|
|
|
Apperenlty, it not Aspose PDF but Aspose Words which has this functionality.
Here [^]is an article explaining how to do that.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
in my application i have provided name search
i am using like Claus if user enter jhone lee and name contains jhone
then i am getting correct result but if enters lee jhone then also i want record to display my sql query is
select name from names where name like '%jhone lee%' correct result
select name from names where name like '%lee jhone %' correct result
plz tell me sql
|
|
|
|
|
nikhil1234 wrote: plz tell me sql
First of all This is ASP.NET Forum. And you question is related to SQL
nikhil1234 wrote: select name from names where name like '%jhone lee%' correct result
select name from names where name like '%lee jhone %' correct result
plz tell me sql
Then why you are not trying this:
select name from names where name like 'jhone %'
|
|
|
|
|
You can take this as an example:
DECLARE @Delimitedtext varchar(max);
DECLARE @Delimiter char(1);
SET @Delimitedtext = 'Manas Bhardwaj';
SET @Delimiter = ' ';
DECLARE @FName nvarchar(max)
DECLARE @LName nvarchar(max)
SELECT
@FName = SUBSTRING(@Delimitedtext,1, CHARINDEX(@Delimiter, @Delimitedtext)-1),
@LName = SUBSTRING(@Delimitedtext,CHARINDEX(@Delimiter, @Delimitedtext)+1, len(@Delimitedtext))
Select
[name]
from
names
where
[name] like '%' + @FName + '%'
or
[name] like '%' + @LName + '%'
I have assumed here that the name will always be comprised of FirstName and LastName.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi,
There is a strange thing in 3.5 Ajaxtoolkit framework:
With Ajaxtoolkit first version (1.0) , put a wizard (and its wizard steps) in an updatepanel worked good.
It's not the cas with last version of Ajaxtoolkit (3.5) : it generates 405 and 120XX errors.
the code is very simple to test it:
<form id="form1" runat="server">
<asp:ScriptManager ID="asm" runat="server" />
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Wizard ID="Wizard1" runat="server">
<WizardSteps>
<asp:WizardStep runat="server" StepType="Start" Title="Ready!">
</asp:WizardStep>
<asp:WizardStep runat="server" StepType="Step" Title="Set!">
</asp:WizardStep>
<asp:WizardStep runat="server" StepType="Finish" Title="Go!">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
(Microsoft article : http://www.ibuyspy.com/learn/Ajax-Control-Toolkit/tutorial-45-cs.aspx)
Have you got the same ?
It does exist a solution ?
Si tu aimes ce que tu fais , tu finis par réussir !
(french proverb of David Zenou)
|
|
|
|