
SixString
Members-
Posts
18 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by SixString
-
Hi :) Im going crazy on a issue im having with a DropDownList The main thing is the dropdownlist is populated from the database and have 1 static Value when SelectedIndexChanged the DropDownList makes a Response.Redirect to another page , on the same page theres a DataGrid with Paging Now the problem is that if a user selects a value on the DropDownList the Response.Redirect happens....so far so good ....but if the user makes a page navigate back the value of the DropDownList its not anymore the Static value ....so if some Paging is done on the DataGrid the Paging dosent happen because whats postedback its the value of the DropDownList . How can i solve this ??? Please Help Thanks in advance Cheers
-
Hi ;) I have a DropDownLIst that as 1 Static Value and is databound with more values when its selected it jumps to another page and i have a DataGrid with paging ..now my problem is that when the user selects something on the DropDownList jumps to the other page then if it does a Webpageback and clicks on the paging Grid the DropDownList do a PostBack when it sould be the DataGrid . How can i (if possible) make the DropDownList always assume the Static value if the User dindt select any of the Databound Values ??? Thanks Cheers
-
Hi :) Can anyone show me how can i display a Label with some Text during the fill of a DataSet Let´s say that a User makes a Search that sends him to another page to find the results Now while the Dataset is filled a Label with some text appears then when dataset is done Label is gone and Datagrid appears Thanks in advance This is part of the code for the Result page : Dim strConn As OleDbConnection = New OleDbConnection(ConfigurationSettings.AppSettings("MyConn")) Dim strSQL As String strConn.Open() strSQL = "SELECT id,brand,catg,foto,ref,descrabrv FROM products WHERE ref LIKE '%" & Search & "%' ORDER BY ref ASC" Dim cmd As New OleDbCommand(strSQL, strConn) cmd.Parameters.Add("@ref", Search) Dim adatp As New OleDbDataAdapter adatp = New OleDbDataAdapter(strSQL, strConn) Dim daSet As New DataSet adatp.Fill(daSet) rstDG.DataSource = daSet rstDG.DataBind() strConn.Close() [edit]Inserted tags [/ vb] and removed multiple line spacing[/edit][/color]
-
Hi :) How do i bind an image to a inputfile ...so that when a user selects a image from the hard disk that image is displayed in the browser ? Thanks in advance Cheers
-
Hi :) Can anyone please show an example on how to resize a image whith code behind Lets say we have an input file to select the image then with code behind grab the info for that file and resize it to a specific width and heigth perserving aspect ratio Thanks in advance Cheers
-
Thanks so much for the help :) Thats just what i need Cheers
-
can someone give a hand on adding a feature to resize the images uploaded on this sample code i dont want thumbnails ...just want to make shure that the files are always resized to a specific value.. thanks The code for now is this : Public Sub upload(ByVal s As Object, ByVal e As EventArgs) Dim s1 As String Dim s2 As String Dim pos As Integer Dim folder As New DirectoryInfo("c:/inetpub/teste.Net/" & TextBox1.Text & "/" & TextBox2.Text) If folder.Exists = False Then folder.Create() End If s1 = arquivo.PostedFile.FileName pos = s1.LastIndexOf("\") + 1 s2 = s1.Substring(pos) arquivo.PostedFile.SaveAs("c:\inetpub\testeNet\" & TextBox1.Text & "\" & TextBox2.Text & "\" & s2) If Page.IsPostBack Then TextBox1.Text = "" TextBox2.Text = "" End If End Sub
-
Hi ;) Can you show me how the code would look like please ?? Thanks
-
Hi ;) I was wondering if anyone can help me with this issue I have this lines of code that insert a new user in the database ..but i would like to check if exists already an e-mail on the database equal to the one submited ..and if it does display a message on a label to let the customer knows that the e-mail inserted already exists . Thanks in advance Sub doInserir(ByVal Source As Object, ByVal E As EventArgs) Dim nome, endereco, cep, uf, email As String Dim MySQL As String = "Insert into Clientes (nome, endereco , cep , uf , email ) values (@nome, @endereco ,@cep , @uf , @email)" Dim myConn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:/teste/dados/Teste.mdb") Dim Cmd As New OleDbCommand(MySQL, myConn) Cmd.Parameters.Add(New OleDbParameter("@nome", frmnome.Text)) Cmd.Parameters.Add(New OleDbParameter("@endereco", frmendereco.Text)) Cmd.Parameters.Add(New OleDbParameter("@cep", frmcep.Text)) Cmd.Parameters.Add(New OleDbParameter("@uf", frmestado.Text)) Cmd.Parameters.Add(New OleDbParameter("@email", frmemail.Text)) myConn.Open() Cmd.ExecuteNonQuery() myConn.Close() End Sub
-
Hey i had a sugestion from an expert ... <code> Public Function CropSentence(title, maxlength, pad) If title.length < maxlength Then Return title Else Return title.Substring(0, maxlength) & pad End If End Function </code> how do i set it to work with something like this : <code> <asp:TemplateColumn> <ItemTemplate> <asp:TextBox class=conteudotd id=TextBox2 runat="server" BorderStyle="None" BorderWidth="0" Rows="0" Columns="0" Enabled="true" ToolTip="Descrição" ReadOnly="True" MaxLength="20" TextMode="MultiLine" Text='<%# DataBinder.Eval(Container.DataItem, "descrabrv") %>' Height="45" Width="400"></asp:TextBox> </ItemTemplate> </asp:TemplateColumn> </code>
-
Hi ;) Can anyone help me with this line of code ..so it will be abble to use on CodeBehind Or anyone as a better way of making this happen??? Thanks in advance <% FUNCTION CropSentence(strText, intLength, strTrial) Dim wsCount Dim intTempSize Dim intTotalLen Dim strTemp wsCount = 0 intTempSize = 0 intTotalLen = 0 intLength = intLength - Len(strTrial) strTemp = "" IF Len(strText) > intLength THEN arrTemp = Split(strText, " ") FOR EACH x IN arrTemp IF Len(strTemp) <= intLength THEN strTemp = strTemp & x & " " END IF NEXT CropSentence = Left(strTemp, Len(strTemp) - 1) & strTrial ELSE CropSentence = strText END IF END FUNCTION %> <% =(CropSentence((DataBinder.Eval(Container.DataItem, "descrabrv").Value), 100, "...")) %>
-
Hi :) I have a TexBox inside a Datagrid TemplateColumm and it works fine but my problem is that i cant use codebehind for it ..that is when i type TextBox1. in the code behind i dont have the options from the dropdown interface ...am i missing something ???? Please help Thanks
-
the concept its something like this I have a text : "See Forum Rules (below) for more information about what codes you are allowed to use in your posts." thats the Text from the database now at runtime i want it to be like this : "See Forum Rules (below) for more information about what codes..." im shure that must be way to manage that Thanks
-
Yes i did ...but since its databound text ..it dosent respect it i guess
-
Hi ;) I have a ReadOnly Multiline TextBox that has DataBound Text and i wat it to have a limit of characters at runtime and i just cant get it to have maximum value for the characters that i specify Can anyone Help please
-
Hi ;) How can i Hide a datagrid if the param Passed in the URL is Empty or null in the database ....and show a label with some Text about the Information passed ???? Thanks in Advance Cheers
-
Thanks a lot mate ;) I could kiss you ...heheh Cheers
-
Hi ;) Im having a problem with this kinda simple issue I have a webform with this code : Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click Response.Redirect("~/result.aspx?Search=" + SearchBox.Text) End Sub My problem is that i cant figure out how the code on the "result.aspx" can grab the Request.QueryString("Search") What i have is something like this : Dim strConn As OleDb.OleDbConnection = New OleDb.OleDbConnection(ConfigurationSettings.AppSettings("MyConn")) Dim strSQL As String Dim Search As String Search = Request.QueryString("Search") strSQL = "SELECT ref FROM products WHERE ref LIKE ?" Dim cmd As New OleDb.OleDbCommand(strSQL, strConn) cmd.Parameters.Add("@ref", Search) strConn.Open() Dim rdr As OleDb.OleDbDataReader = cmd.ExecuteReader DataGrid1.DataSource = rdr DataGrid1.DataBind() strConn.Close() Please someone help me whith this??? Thanks in Advance Cheers