|
|
Hello all,
I have a form view in which I have a dropdownlist among other controls. the dropdownlist is bound to an sqldatasource.
Now i want to add an item to the dropdown list manually in the code behind but I am not being able to access it.
Can you please guide me to the steps to take in order to access the dropdownlist from code behind.
Thank you very much,
Chris
|
|
|
|
|
Hi Guys,
I am doing a search in which the results are displayed in a grid view.In the grid view attributes i have declared the PageSize=5 and PageIndex=10.
My problem is when I have viewed the next pages in the grid view, If I give a new search condition the result set in the grid view loads with the same PageIndex.
I would like to show my search result in the grid view starting from the first page, irrespective of the page index viewed for the last search.
If anyone knows the solution or suggestion Please reply
Thanks
Jith
|
|
|
|
|
Just set the PageIndex to 0 in the event handler of the search button.
Not really difficult, or am I missing something?
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Hi,
I tried using Gridview1.PageIndex = 0; in the SubmitButton Click Event after DataBinding, but it is not working.
thanks,
jith
|
|
|
|
|
how to implement barcode in our application please solve it
thanks
|
|
|
|
|
What exactly do you want it to do ? You can't expect to read barcodes across ASP.NET, although you can generate and display them, the ASP.NET part is then irrelevant, you just add the images to your page.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
sir
I face problem in which we add custome control in our application Succecfully. But when we publish it then those custome control are not available in other system and also own system with particular Url.Please solve this problem.
thanks
Puspendra Kumar
|
|
|
|
|
You may probably add the custom control to Web Control Library. and generate the assembly. Then, reference this assembly from the application that you wanna use this control.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hello All,
What is the best practice for storing images for web application?
Let's say I wanna develop the web photo gallery application like Flickr. Where should I store the images that uploaded by user? Database or File?
I think storing the images in the database would be good for security reason but there is more cost for rendering the image.
If we store the image directly to file system, we have to give the "write permission" to the user so it might cause the security problem..
So, I'm not very sure where those image should be saved. It would be great if you all can suggest me..
Thanks in advance..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Store paths in the DB, then you can just pass paths around to img tags to show the images in your app.
You don't have to give any sort of write permission, you get the images passed into your web app, and your app writes them to the location, the user has no such permission on the folder.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for your reply. Chrisian.
Christian Graus wrote: Store paths in the DB, then you can just pass paths around to img tags to show the images in your app.
I think I need to repharse my sentense.
Let's say the application that I'm working on is Photo Gallery. So, there will be one feature that allows the users upload their images. My question is that where I should store those uploaded images. Should I store the image as binary in database or store the path in database and store the images in upload folder?
If I store the path ( "./upload/user1/album/image1.jpg") in database, the image ("image1.jpg") has to be uploaded under "/upload/user1/album/" folder. So, I will need to give "write permission" to "upload" folder or "/upload/user1/" folder.
Is it good way to do?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi,
Can anyone help me to add attributes to form tag of master page from child page?
I am able to access the control using the following piece of code:
this.Master.FindControl("MasterForm")
But i am not able to add attributes.
I want to add "action", "target" attributes from child page to master page.
It's very urgent...
Thanks in advance
Sumithra Guturi
|
|
|
|
|
I’m encountering a new kind of problem using Crystal Report for .Net 2005.
If I export a report in a Word or Excel format it works fine but when I set the content type to PDF I get the Adobe PDF splash screen and nothing happens, the content of the web page doesn’t change.
This is a summary of the code I’m currently using (that used to work with CR 8.5):
Dim crExportOptions As ExportOptions
crExportOptions = ExportFileFormats.PDF
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
crExportOptions.FormatOptions = New PdfRtfWordFormatOptions
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
Dim req As ExportRequestContext = New ExportRequestContext
req.ExportInfo = crExportOptions
Dim st As System.IO.Stream
st = ReportDocument.FormatEngine.ExportToStream(req) -- (ReportDocument is a crystal reports filled with all the required parms and data. Works with Word and Excel)
Dim b(st.Length) As Byte
st.Read(b, 0, st.Length)
Response.BinaryWrite(b)
Response.End()
|
|
|
|
|
Hello friends and gud morning..
I am newer to asp.net and i want to implement ajax technology in my applications. So Please give me links to understand simple ajax implementations and there use in web applications
|
|
|
|
|
Get It . Ajax
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Depends what you mean by 'simple. You've been given a link to the Microsoft AJAX library, that will give you some AJAX functionality without writing any AJAX code. Writing your own simple AJAX code would not involve using this library at all.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I added some extra fields in the login controls,altered the respective tables,procedures but unable to pass parameters to the procudres due to this getting exception "procedure expecting parameter..."
Please help me to get out from this problem
nit
|
|
|
|
|
Is the Repeater control able to handle input? This is the code I am using right now. I am not able to get the values from the TextBox fields.
I am trying to populate a series of TextBoxes that will contain user input for the related process field. I am using ASP.NET 2.0 and C#.
Thanks!
Client Side:
<asp:Repeater ID="rptrProccessInput" runat="server">
<ItemTemplate>
Process: <%# DataBinder.Eval(Container.DataItem, "process") %> Target:<asp:TextBox runat="server" ID="txtTarget"></asp:TextBox> Comment:<asp:TextBox runat="server" ID="txtComment"></asp:TextBox><br>
</ItemTemplate>
</asp:Repeater>
Server Side:
protected void Button2_Click(object sender, EventArgs e)
{
TextBox txtTarget = null;
TextBox txtComment = null;
foreach (RepeaterItem ctrl in rptrProccessInput.Items)
{
txtTarget = (TextBox)ctrl.FindControl("txtTarget");
txtComment = (TextBox)ctrl.FindControl("txtComment");
Debug.WriteLine(txtTarget.Text +":"+ txtComment.Text);
}
}
|
|
|
|
|
You are not passing values to Textbox
try this
<asp:TextBox runat="server" ID="txtTarget" Text='<%# DataBinder.Eval(Container.DataItem, "process") %>'></asp:TextBox>
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
In this code if a lot is occupied the label turns red and if not its green.
But instead of using color i would like to use images to represent this change.
Can any one Help??
<br />
Dim sqlDataReader As Data.SqlClient.SqlDataReader= sqlLotStatus.EndExecuteReader() <br />
<br />
Dim lotStatus As String<br />
Dim textLabelName As String<br />
Dim colourLabelName As String<br />
Dim textLabelCtrl As Label<br />
Dim colourLabelCtrl As Label<br />
<br />
While sqlDataReader.Read()<br />
' Derive label names.<br />
textLabelName = "Label" & sqlDataReader("Lot_id").ToString() & "Text"<br />
colourLabelName = "Label" & sqlDataReader("Lot_id").ToString() &"Colour"<br />
<br />
' Get Label controls with derived names.<br />
textLabelCtrl = CType(Me.FindControl(textLabelName), Label)<br />
colourLabelCtrl = CType(Me.FindControl(colourLabelName), Label)<br />
<br />
' Set control properties for lot.<br />
lotStatus = sqlDataReader("status").ToString()<br />
If lotStatus = "occupied" Then<br />
textLabelCtrl.Text = sqlDataReader("Lot_id").ToString() & " is not available"<br />
colourLabelCtrl.BackColor = Drawing.Color.Red<br />
Else<br />
textLabelCtrl.Text = sqlDataReader("Lot_id").ToString() & " is available"<br />
colourLabelCtrl.BackColor = Drawing.Color.Green<br />
End If<br />
End While<br />
|
|
|
|
|
duo!@# wrote: instead of using color i would like to use images to represent this change.
then, use the image control instead of Label.
OR.
You can set the style to that label.
Example :
Style ~
<style type="text/css">
.TurnOn{
background : transparent url(http:
}
</style>
Code ~
If lotStatus = "occupied" Then
Label2.CssClass = "TurnOn";
Else
Label2.CssClass = "TurnOff";
End If
Hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Thank You For the code.
But is there a way were i could use images instead of labels
cos i intent to create a layout based view of a car park
transparent url(http://url.com/ig/images/myimage.png) Wht is this for?
|
|
|
|
|
This has been really bugging me, what's the best way to tell the ContentPlaceHolder not to render a <span> tag? It seems quite a design flaw because if you include a block element such as <p>, <table> or <div> inside the content page then it will not be XHTML 1.1 Strict compliant . Anyway of changing the rendering to render nothing, or a <div> tag, short of writing my own ContentPlaceHolder of course.
|
|
|
|
|
Ed.Poore wrote: if you include a block element such as , or inside the content page then it will not be XHTML 1.1 Strict compliant
You mean, p,table,div tag can't be put inside the ContentPanel?
It is very strange to me. I used to us those tags in ContentPanel all the time. I didn't have any problem with it...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|