- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I am a .Net programmer
- Interests
- Just Microsoft
29 Posted Topics
Re: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Page.IsPostBack = False Then For i As Integer = 1 To DropDownList1.Items.Count Dim tree As New TreeNode tree.Text = i.ToString tree.PopulateOnDemand = True tree.CollapseAll() TreeView1.Nodes.Add(tree) Next End If End Sub Protected Sub TreeView1_TreeNodePopulate(ByVal sender As Object, ByVal … | |
Re: Imports System.data.sqlclient Imports system.data dim objcon as new sqlconnection dim dt as new datatable dim str as string = " DataBase Path " If objcon.state = connectionstate.closed() objcon.connectionstring = str objcon.open() end if dim query as string="select * from infomation_schema.tables" dim da as new sqldataadapter(query,objcon) da.fill(dt) dropdownlist1.datasource = dt dropdownlist1..datatextfield … | |
Re: Hi goto address below hope it is usefull [url]http://msdn.microsoft.com/en-us/goglobal/bb688134.aspx[/url] KOUROSH NIKZAD | |
Re: JavaScript can not talk with serverside methods since the client is on the Earth and the server is the Moon. You need to use a spaceship to get there. So you need to either postback the page or look into using Ajax. visit [url]http://weblogs.asp.net/mschwarz/archive/2005/02/15/373072.aspx[/url] source >> [url]http://forums.asp.net/t/1184597.aspx[/url] | |
I have a website at: [MTN Charge](http://www.shaarzh.com) this site is hosting by a company that provides charge for mtn Operators... I dont access to any control panel,the only panel i have access is a template panel that I can add some javascript or html and meta tags . I know … | |
Re: Try to declare a new object of richtextbox. then u can access all of properies and methods of richtextbox | |
Re: hi I hope the link below is helpfull for you,,, [Click Here](http://books.google.co.uk/books?hl=fa&lr=&id=5FIEAwyn9aoC&oi=fnd&pg=PP2&dq=data+mining&ots=zkdsim-pjd&sig=HU4bhSAoa-0zIVnc8vvlrYkn0_E&redir_esc=y#v=onepage&q=data%20mining&f=false) please reply about the link above visit my site : [Click Here](http://www.shaarzh.com) | |
Re: page.aspx: [CODE] <asp:LinkButton ID="btnPage" runat="server" CommandName="FileNo" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "FileNumber") %>' Text='<%#DataBinder.Eval(Container.DataItem, "FileNumber") %>' > </asp:LinkButton> [/CODE] page.aspx.cs: [CODE] protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "FileNo") { string ID = e.CommandArgument.toString(); Response.Redirect("page.aspx?id="+id); } } [/CODE] | |
Re: u can't use viewstate in user control, when u want to move around your pages | |
Re: javaScript Code: [CODE] <script language="javascript" type="text/javascript"> function showDate() { var date = document.getElementById('txtDate').value.toString(); document.getElementById('selectedDate').value = date; } </script> [/CODE] page.aspx: [CODE] <asp:Button ID="btnGetDate" runat="server" OnClick="btnGetDate_Click" Text="Button" OnClientClick="showDate()"/> <input id="selectedDate" type="hidden" runat="server" /> [/CODE] code behind: [CODE] protected void btnGetDate_Click(object sender, EventArgs e) { string Date = selectedDate.Value.ToString(); } [/CODE] | |
Re: are run Reconfigure after enable 'user instances' when u type : exec sp_configure 'user instances enabled', 1 in query editor then u must type : Reconfigure and then restart the SQL Server database. | |
Re: javaScript Code: [CODE] <script language="javascript" type="text/javascript"> function getTextBoxID() { var srcid = window.event || arguments.callee.caller.arguments[0]; var target = srcid.target || srcid.srcElement; document.getElementById('textBoxId').value = target.id; } </script> [/CODE] page.aspx: [CODE] <asp:TextBox ID="TextBox1" runat="server" OnClick="javascript:getTextBoxID();"></asp:TextBox><br /> <asp:TextBox ID="TextBox2" runat="server" OnClick="javascript:getTextBoxID();"></asp:TextBox><br /> <asp:TextBox ID="TextBox3" runat="server" OnClick="javascript:getTextBoxID();"></asp:TextBox><br /> <asp:TextBox ID="TextBox4" runat="server" OnClick="javascript:getTextBoxID();"></asp:TextBox><br /> <asp:TextBox … | |
Re: hope helps u [CODE] private string GetErrorMessage(MembershipCreateStatus status) { switch (status) { case MembershipCreateStatus.DuplicateEmail: return "right Message"; case MembershipCreateStatus.DuplicateUserName: return "right Message"; case MembershipCreateStatus.InvalidAnswer: return "right Message"; case MembershipCreateStatus.InvalidEmail: return "right Message"; case MembershipCreateStatus.InvalidPassword: return "right Message"; case MembershipCreateStatus.InvalidQuestion: return "right Message"; case MembershipCreateStatus.ProviderError: return "right Message"; case MembershipCreateStatus.UserRejected: return … | |
Re: hi bro, can u explain more about your problem, any way try this: [CODE] private void LoadData(int [COLOR="red"][U][B]PageSize[/B][/U][/COLOR]) { DataTable dt = new DataTable(); dt= "your query to DataBase " PagedDataSource pgitems = new PagedDataSource(); DataView dv = new DataView(dt); pgitems.DataSource = dv; pgitems.AllowPaging = true; [COLOR="Red"][U][B]pgitems.PageSize = PageSize[/B][/U];[/COLOR] pgitems.CurrentPageIndex … | |
Re: [ATTACH]20038[/ATTACH]web.Config [COLOR="Red"][U][B]u cant send email from localhost[/B][/U][/COLOR] [CODE] <system.net> <mailSettings> <smtp deliveryMethod="Network" from="email Address"> <network host="mail server" userName="" password="" [U][I][B][COLOR="red"]port="25"[/COLOR][/B][/I][/U] /> </smtp> </mailSettings> </system.net> [/CODE] page.aspx [CODE] <asp:PasswordRecovery ID="PasswordRecovery1" runat="server" CssClass="txt" ForeColor="Yellow" GeneralFailureText="" QuestionFailureText="" SuccessText="" UserNameFailureText=""> <MailDefinition BodyFileName="[COLOR="Red"][B][I][U]PassRecovery.txt[/U][/I][/B][/COLOR]" From="info@saynacandles.com" Priority="High" Subject="" IsBodyHtml="True"> </MailDefinition> </asp:PasswordRecovery> [/CODE] PassRecovery.txt : <%UserName%> <%Password%> | |
Re: which Asp:control is shows Data? usually data controls has a property named: dataKeyName. If u use asp:dataControl u must set dataKeyName. for example [CODE] <asp:GridView ID="GridView1" runat="server" [COLOR="Red"][U][B]DataKeyNames[/B][/U][/COLOR]="dr_id,dr_name,dr_family"> </asp:GridView> [/CODE] | |
Re: [CODE] Label1.Text =Cart.basketTotal(Session["orderid"].ToString(), total.ToString()); [/CODE] | |
Re: hi dear it is not recommended that you save your posted file in database you must save the file name in a string field like: Pic_url you must do : [CODE]protected void Button1_Click(object sender, EventArgs e) { //check fileupload has a file or not if (FileUpload1.HasFile) { //save filename as … | |
Re: check your Web.config>>ConnectionString you must Have: [CODE] <configuration> <connectionStrings> <clear/> <add providerName="" name="" connectionString=""/> </connectionStrings> [/CODE] | |
Re: put dropdown in ispostback [CODE] if(!Page.IsPostBack) { DropDownList1.DataSource=dt; DropDownList1.DataValueField="field"; DropDownList1.DataTextField="field"; DropDownList1.DataBind(); } [/CODE] | |
Re: use Dispose() for example: [CODE] Bitmap bmp = new Bitmap(FileUpload1.FileContent); bmp.Dispose(); [/CODE] | |
hi I have a TextBox that I want it's default language sets to farsi I mean when somebody whants write on it ,by default language sets to Farsi-IR | |
Re: Hi U can use this ConnectionString : Imports System.Data Imports System.Data.SqlClient Dim objcon As New SqlConnection Dim constr As String="Data Source=.\SQLEXPRESS;AttachDbFileName=|DataDirectory|\database.mdf;_ Integrated Security=True;User Instance=True;" objcon.ConnectionString=constr U can use also this string: Dim constr As String="Data Source=localhost;Initial Catalog=your database name;Integrated Security=SSPI" Kourosh Nikzad | |
Re: Hi [code] Dim arrFilename() As String = Split(lblFilePath.Text, "\") For i As Integer = 0 To arrFilename.Length - 1 Dim query as String="your Insertion Query Valuse('arrFilename(i)')" Next [/code] Kourosh Nikzad | |
Re: Hi its like 2005 connection string "ServerName;Initial Catalog=DataBaseName;User ID=username;password= password" KOUROSH NIKZAD | |
Re: [code] Imports System.Data Imports System.Data.SqlClient Dim dt As New DataTable Dim objcon as new SqlConnection Dim str as string= _ "data source=.\sqlexpress;attachdbfilename=|datadirectory|\database.mdf;integrated_ security=true;user instance=true;" objcon.connectionstring=str objcon.open() Dim query as string="select * from user" Dim da As new SqlDataAdapter(query,objcon) da.fill(dt) dropdownlist1.datasource=dt dropdownlist1.datatextfield="field that you want" dropdownlist1.databind() objcon.close() [/code] KOUROSH NIKZAD | |
Re: add a webform for example : UserAddRow.aspx in the gridview unchecked the auto-generate fields add a hyperlinkfield in the properties/data>>DataNavigationUrlField put the field of the table you retreive to data adapter in the DataNavigationUrlFormatString write UserAddRow.aspx?x={0} x contains the user ID and you can get it in page above on … | |
Re: Imports System.data.sqlclient Imports system.data dim objcon as new sqlconnection dim dt as new datatable dim str as string = " DataBase Path " If objcon.state = connectionstate.closed() objcon.connectionstring = str objcon.open() end if dim query as string="select * from infomation_schema.tables" dim da as new sqldataadapter(query,objcon) da.fill(dt) dropdownlist1.datasource = dt dropdownlist1..datatextfield … |
The End.